Commit Graph

1014 Commits

Author SHA1 Message Date
st.ji
d41b9ac699 Add DENSITY_600
Add 600dpi as a supported screen density

Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass

Change-Id: Iac673eae2d82c27d96e279c076454af2f5933208
Signed-off-by: st.ji <st.ji@samsung.com>
2018-08-20 02:23:42 +00:00
Mathew Inwood
b407568c55 Add @UnsupportedAppUsage annotations
For packages:
  android.util.proto
  android.util.jar
  android.util.apk
  android.util

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I18848448a81132399f6878812acf5031ed8cec9f
Merged-In: Ia0f48c244b0fbe33d40d797702a82303648196ed
2018-08-14 17:32:44 +01:00
Josh Gao
c81f53f7f1 MemoryIntArray: track the owned file descriptor in a PFD.
AUPT is triggering an fdsan diagnostic when creating a temporary
ParcelFileDescriptor to write to a Parcel. This code seems correct at
first glance, so under the assumption that some other code is closing
the file descriptor out from under us, keep our owned file descriptor
around as a ParcelFileDescriptor to catch the perpetrator in the act.

Bug: http://b/112405224
Test: atest MemoryIntArrayTest
      (testAshmemSizeMatchesMemoryIntArraySize failed/crashed before, fails now)
Change-Id: Ie8ff7562c78ecde4cf1757d572ecb733213cc975
2018-08-09 16:32:42 -07:00
Mathew Inwood
5d44cf6f72 Merge "Code formatting change for upcoming annotations."
am: 5d669f79f2

Change-Id: Iffd38fbc5ee5cd01d5900afbfee331e005b860c6
2018-08-01 16:05:35 -07:00
Mathew Inwood
c092f2317b Code formatting change for upcoming annotations.
Putting /** @hide */ on the same line results in the automated annotation
addition putting the annotation the previous line, which then results in
the @hide javadoc annotation being ignored (since it's now no longer
strictly before the method declaration).

Bug: 110868826
Test: m
Change-Id: I1b5c290a17ead46effd2f2ff3f4b33884efbc116
2018-08-01 13:52:03 +01:00
Paul Duffin
6565aae0e9 Merge "Remove dependency on InflaterInputStream.closed field."
am: 555fc87b99

Change-Id: I66687ef9b82fb2071e6fc04726d099bc1b5fab65
2018-07-24 02:27:35 -07:00
Paul Duffin
96a1368158 Remove dependency on InflaterInputStream.closed field.
In upstream OpenJDK the InflaterInputStream.closed field is private.
During integration of OpenJDK into Android it was changed to be
protected so that it could be used by StrictJarFile, and in the process
was accidentally made part of the public API. This change removes the
StrictJarFile dependency on that field.

Bug: 111061052
Test: checkbuild, flash and run FrameworkCoreTests
Change-Id: I8aee1c444cf27e7078b848c65e0433c831ab06a0
2018-07-23 15:55:33 +01:00
Tobias Thierer
597eb7f87e Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME."
am: 2dc5a42743

Change-Id: I5a61fe6e4b9507a754f8977225bc4dbbee88a4ff
2018-07-20 10:11:27 -07:00
Treehugger Robot
2dc5a42743 Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." 2018-07-20 15:50:59 +00:00
Tobias Thierer
8a0845e517 Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME.
Introduce a constant StrictJarManifest.ATTRIBUTE_NAME_NAME so that
callers (StrictJarManifest{,Reader}) don't need to rely on
Attributes.Name.NAME which was added via an Android patch.

Bug: 35910877
Test: Treehugger

Change-Id: I292fbefc6c5561609dcd8281d1e2a931a1ffa5b2
2018-07-13 17:29:35 +01:00
Neil Fuller
7add22db60 Merge "Move XML object factory logic to libcore"
am: 8176fb99e1

Change-Id: Ib0940ecb89eaf11841bbd66cdaf1c5379466496c
2018-07-12 11:26:03 -07:00
Neil Fuller
f4634736ca Move XML object factory logic to libcore
It makes sense to hide the details of the parser implementation
(and other similar objects) in libcore so it could be changed.

This change removes the "ExpatPerformanceTest" which appears not to have
been maintained and was comparing KxmlParser with itself. It is assumed
that android.util.Xml used to return the expat parser.

Test: build
Bug: 111055375
Merged-In: Ibad247323ba90cd949aecb2bd92f2f73306a4327
Change-Id: Ibad247323ba90cd949aecb2bd92f2f73306a4327
2018-07-11 14:02:00 +01:00
Neil Fuller
3147288c3b resolve merge conflicts of 7980b19bc8 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ica0d3578c6e3fcd17b350f63b4acd471774ac014
2018-07-06 16:32:44 +01:00
Treehugger Robot
7980b19bc8 Merge "Track changes in libcore to remove a constructor" 2018-07-06 13:58:29 +00:00
Neil Fuller
baae7fa357 Track changes in libcore to remove a constructor
Track changes in libcore to remove a constructor + lint
import order changes. Instead of the constructor a utility
method is introduced.

Test: Build / boot
Bug: 111055375
Merged-In: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
2018-07-04 09:11:08 +01:00
Neil Fuller
04c66489bc Merge "Make Half class use public APIs"
am: 7e957e57b7

Change-Id: I7f41f07ed5d35a0c538c90b49b4500ba9952f74d
2018-07-03 13:08:26 -07:00
Neil Fuller
f9d88dfac1 Make Half class use public APIs
Half has a dependency on an internal sun.misc.FloatingDecimal
that can be replaced by an equivalent call on java.lang.Float
(which calls through to FloatingDecimal).

Any performance hit is worth it for a smaller API surface.

Bug: 111055375
Test: Build
Change-Id: Iecdf3aa9414922a77edbdc439b0c2b88033b3af8
2018-07-02 12:04:39 +01:00
Neil Fuller
325ecf7df4 Merge "Add more behavior to TimeDetectorService"
am: b1fc5a4c7e

Change-Id: Ibbda2d253bf807cc480a4218aa1d898d6737ec7b
2018-06-26 05:14:31 -07:00
Neil Fuller
4980bbcd30 Add more behavior to TimeDetectorService
The client code now "suggests" time updates
to the time detection service. The current implementation
of the time detection service will validate and set the
device system clock as needed. In future it will ignore
these suggestions if better information is available.

Responsibility for sending the
TelephonyIntents.ACTION_NETWORK_SET_TIME intent has
been moved to the time detection service until it can be
removed or replaced.

The telephony code is still responsible for basic rate
limiting but the majority of the decision logic has been
moved to the service.

There is an associated change in telephony code to switch to
using the server.

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: I4f7a10ac06b2d32da22689e1ddf309e0a2795f30
2018-06-25 19:34:05 +01:00
Neil Fuller
494665870f Merge "Add TimestampedValue.toString()"
am: bfa58946f7

Change-Id: I38760ef47ba04f20882a467857e7c57c088d4391
2018-06-14 02:40:17 -07:00
Neil Fuller
ca97b34330 Add TimestampedValue.toString()
To make debug logging useful.

Bug: 78217059
Test: Build
Change-Id: I710b56d189afeb26ac50f55d9286d04219779ee7
2018-06-13 15:29:05 +01:00
Neil Fuller
415585f2a5 Merge "Simple pass-through TimeDetectorService"
am: cb749e2e50

Change-Id: Ic2e3d3c3f9181ef4054f599baf4ac086ec21d8bd
2018-06-12 11:17:51 -07:00
Neil Fuller
4773b9dadc Simple pass-through TimeDetectorService
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.

This cherry-pick contains a small change: to use
SystemClock.elapsedRealtime() instead of the newer
SystemClock.elapsedRealtimeClock() with Clock.millis().

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
(cherry picked from commit 24836bfb15)
2018-06-12 15:33:35 +01:00
Lucas Dupin
94eca2cbd4 Enable systemui_theme feature flag
Turning flag on even though translations are not ready in order to
expose feature and make sure it was properly tested before release

Change-Id: I10f515b1bdcae45d1ed6d6d293afe1853f44dc02
Bug: 63903361
Fixes: 75498812
Test: manual
2018-05-24 20:07:44 -07:00
Lucas Dupin
06daff0660 SystemUI theme feature flag
Hide SystemUI theme under feature flag, this way we can enable it when
we're sure that all new strings were localized and the feature is ready
for prime time.

Bug: 63903361
Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemUiThemePreferenceControllerTest
Change-Id: I1093d414d951b71cab7cff10187c63bdd80eeee2
2018-05-23 12:52:37 -07:00
Kurt Marcinkiewicz
7a4ff6447d Allow specifying a network for SNTP time sync
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
(cherry-pick of pi-dev Ic9fc169cf75457810d4992121d85d7642e350b90)
Merged-In: I339c77063c72a9d76a5c4cb17052e20fb6e045a6
Merged-In: I8dfd1cad99c63efdc14c174c19f094a61cdfc44f

Change-Id: I44df66688292b144ec7dfcdd9ae5d82489f82774
2018-05-16 16:43:43 +09:00
Suprabh Shukla
1938e34e42 Mitigating cache corruption in ArrayMap
Before calling freeArrays, storing the array reference into a temporary
pointer so that the main pointer doesn't end up corrupting the static
pool of arrays on concurrent access. An earlier change missed a rare
case when removeAt was called for the last element in the map.

Test: atest android.util.ArrayMapTest
atest android.util.cts.ArrayMapTest

Bug: 78898947
Change-Id: I454c5b1600eb0a6c690e746df10f6a0ebcd8aa1d
2018-05-14 14:51:01 -07:00
android-build-team Robot
291b944d89 Merge "Adding batterystats history to proto dump." into pi-dev 2018-05-08 14:58:09 +00:00
Kweku Adams
71a9531806 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'

Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
2018-05-07 17:53:57 -07:00
yro
be6d7f90e8 Re-enable the logging of APP_BREADCRUMB_REPORTED atom
Bug: 78613419
Test: manual, cts, unit tests
Change-Id: I279158c8031eda3ee648053ae6a0d13fde7f1176
2018-05-06 22:25:05 -07:00
Victor Hsieh
4cf738204f Avoid using 0 for fs-verity extension ID
Also:
 * Adjust size and order of some fields
 * Fix Merkle tree size calculation bug

Test: Verify fs-verity works with kernel patch
Bug: 67380979
Change-Id: I58f14cfe9630c1ff62ed64dbf333bb1c9bfe0fb1
2018-05-02 16:40:34 +00:00
Victor Hsieh
8d1553b9b1 Verify best signature algorithms of all signers
The previous implementation does not verify signature algorithms of all
signers.  It's possible that the attacker can take an old apk (with
digest and signature of old algorithm) and add their own signer block
with new/P digest and signature.  In this case, the old implementation
only verifies the attacker's signature, thus the attacker can change apk
content easily.

The solution here is to verify digests of all best signature algorithms
by all signers.

It is expected to increase verification time, if the apk does have
multiple signers with different type of digests.

Test: apks still install
Bug: 78359754
Change-Id: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
Merged-In: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
(cherry picked from commit 2f2ced93e3)
2018-04-23 19:22:28 +00:00
Caxton Chan
116e05cbba Merge "Enable feature flag for audio output switcher." into pi-dev 2018-04-16 19:24:31 +00:00
Michael Wright
585ff988bb Convert the BrightnessController to a log scale control.
Currently, the BrightnessController's UI is a linear scale control on
top of a linear backlight control, but humans perceive brightness on a
roughly logarithmic scale. By moving to a non-linear control, we both
give users more fine-grained control over the brightness of the display
as well as a UI that works more intuitively.

Test: manual
Bug: 73810208
Change-Id: I67090ad7c4ced0420314458473c9124cb9c61906
2018-04-16 14:47:33 +01:00
ryanywlin
651d0335c1 Enable feature flag for audio output switcher.
Bug: 74130772
Test: Build
Change-Id: I04d0276681488c73c62b1f9ab6114c948bb50482
2018-04-12 02:13:51 +00:00
Jeff Sharkey
0a5570d49d APIs to disable data usage notifications.
Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis.  (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active.  Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
2018-04-11 22:07:40 +00:00
Jeff Sharkey
0fc6d03b62 API council requested tweaks to SubscriptionPlan.
Return new shiny Range<> object instead of Pair<>.  Tell developers
what permission to check on refresh broadcast.  Describe what
exceptions might be thrown, and that an empty list is okay.

Allow creation of plans with richer Period object, instead of forcing
them into rigid week or day options.

Protect SubscriptionPlan broadcast.

Test: atest android.util.RecurrenceRuleTest
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Bug: 74945820
Change-Id: I7e555798e0cfaa214ca93d9df627c6443fc5d986
2018-04-04 16:06:27 -06:00
TreeHugger Robot
d05c00fbb6 Merge "Require signing cert history certs to be unique." into pi-dev 2018-03-30 23:35:54 +00:00
TreeHugger Robot
01a0288ca1 Merge "Fix fs-verity per fs-verity spec change" into pi-dev 2018-03-30 18:43:24 +00:00
Daniel Cashman
10d19e9808 Require signing cert history certs to be unique.
Bug: 73943012
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest
Change-Id: Id7e91c60f1619ef793d73a9dd736debf7ad2ae0c
(cherry picked from commit ef05408bcd)
2018-03-30 15:13:42 +00:00
Bookatz
ebf962f74b Dummy WorkChain class
To avoid future merge conflicts, a dummy WorkChain class must be
added temporarily. It goes along with the dummy StatsLog.java class.

Bug: 71607284
Test: none
Merged-In: Iff361eb98e079c7b2146c092dc27a3618a813c94
Change-Id: I66cf0c36c1842b99a5a4dd104fc5c06c0cfbe2b5
2018-03-29 09:43:05 -07:00
TreeHugger Robot
dea705ba59 Merge "Remove feature flag for battery settings" into pi-dev 2018-03-27 20:23:23 +00:00
Lei Yu
4c4efd09de Remove feature flag for battery settings
Bug: 76027338
Test: Build
Change-Id: Ie15e7b05d81e93a9db0569a3e7c00faf9c9a60e3
2018-03-26 14:50:42 -07:00
Jeff Sharkey
eb738c1c50 API council requested tweaks to DataUnit.
Test: none
Bug: 71584606
Change-Id: Ic516dd7645e150586d7dd2e389e7663a32924ecc
2018-03-26 13:37:20 -06:00
Victor Hsieh
cccad1971e Fix fs-verity per fs-verity spec change
- Reorder and adjust fields per fs-verity format change.
- Since header + tree is no longer full page size, pass the length with
  shared memory (which is full pages).
- Fix offset and padding of patch extension.
- It is now required to issue the measure ioctl (via
  assertFsverityRootHashMatches) right after fs-verity is enabled.

Test: adb install a new priv app, saw fs-verity log in dmesg. Read the
      whole file successfully.
Bug: 30972906
Change-Id: I480ae2b5debaf76ef24dadf2d79d1903c7967f03
2018-03-23 22:16:09 -07:00
Kurt Marcinkiewicz
991b971acb Merge "Allow specifying a network for SNTP time sync" into pi-dev 2018-03-23 18:02:19 +00:00
Kurt Marcinkiewicz
dfdd82e84f Allow specifying a network for SNTP time sync
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ic9fc169cf75457810d4992121d85d7642e350b90
2018-03-22 13:43:25 -07:00
Jan Nordqvist
5c4a42d532 Enable new data usage settings features.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I0d2942bf8b8e13ebefd7df899a6ecfc6595d1780
2018-03-21 15:09:04 -07:00
Eugene Susla
18e7fc1114 [DO NOT MERGE] Eliminate duplicate layers in A11yService#getWindows()
Fixes: 73904014
Test: using TestBack, ensure the attached bug is fixed
Change-Id: I097ca47563420d658cea083a3b6f8d5e7d02991c
(cherry picked from commit 8f0124190a)
2018-03-20 19:39:06 +00:00
David Chen
c1a3a0d780 Small fixes to StatsManager API.
Adds some annotations, deletes an unused API method, and adds some
comments.

Test: Flashed onto marlin-eng and verified there are no crashes.
Bug: 72562867
Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
2018-03-19 10:26:51 -07:00