Commit Graph

1029 Commits

Author SHA1 Message Date
Neil Fuller
33e7250f1f Merge "Track changes in libcore to remove a constructor" 2018-07-05 10:27:40 +00:00
Neil Fuller
8a1683f0a2 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
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
2018-07-04 09:10:55 +01:00
Neil Fuller
bfef432a69 Merge "Make Half class use public APIs" am: 7e957e57b7 am: 04c66489bc
am: 8b14d33acb

Change-Id: I6eb87843c251f726de2feb6827c54c8f7b75f1fe
2018-07-03 13:27:01 -07: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
Stanley Tng
fe8c8337ed Add Feature Flag for Hearing Aid Profile
Using the Settings App-Developer Options-Feature Flag, allow the user to
enable or disable the Hearing Aid Profile.

Test: Manual testing using Settings App
Change-Id: I58a9d339941e235242c443c85b6f4194b5a296c9
2018-06-28 15:31:50 -07:00
Neil Fuller
58969298c1 Merge "Add more behavior to TimeDetectorService" am: b1fc5a4c7e am: 325ecf7df4
am: 55b29baea1

Change-Id: I4fe5fe32ffbd807680d688f4415e5dc9e47069d5
2018-06-26 05:33:35 -07: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
Raff Tsai
c753a9ce77 Add feature flag for dynamic home page development.
Test: rebuild

Change-Id: Ifddd500b008725e01746e3ed82548bd8bc0472e9
2018-06-20 13:48:03 +08:00
Neil Fuller
292b08ff87 Merge "Add TimestampedValue.toString()" am: bfa58946f7 am: 494665870f
am: 252382bede

Change-Id: If79479053e5139da52be2c004203077537613d40
2018-06-14 02:59:40 -07: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
Neil Fuller
1ed497ce1b Merge "Simple pass-through TimeDetectorService" 2018-06-12 09:49:33 +00:00
Neil Fuller
24836bfb15 Simple pass-through TimeDetectorService
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
2018-06-11 21:13:53 +01:00
Fan Zhang
a4b77ef1ee Remove flag for data usage v2.
Change-Id: I83c68eb8b2c44eb5925f31065d4897a9823cedd6
Fixes: 109943959
Test: rebuild
2018-06-11 10:00:43 -07:00
Tor Norbye
b749bdb5ff Add typedef for the Log level
This CL adds an @IntDef specifying the valid constants
that can be supplied as the Log level.

It also removes a documentation reference to a (former?) level
named "SUPPRESS" which doesn't exist.

Test: In lint
Change-Id: I159d687a5c16be76afcd7a3370a5f02025a1aff7
2018-06-05 08:15:40 -07:00
Jake Wharton
d4a238971d Annotate Log reference parameters and return types.
Bug: 78245676
Test: atest LogNullabilityTest
Change-Id: Icbb26d23ed89e1fabd019108d4484902468c165e
2018-06-04 21:33:52 -04:00
TreeHugger Robot
14d47831d2 Merge "remove feature flag for DeviceInfoSettings in Settings" 2018-05-30 20:14:51 +00:00
Lucas Dupin
3ef7b09cac Merge "Enable systemui_theme feature flag" into pi-dev am: 14e605d7e9
am: 9da10af64b

Change-Id: I3dfdfcc303ae69fcfa5fee8da592e941d0b66518
2018-05-29 12:21:15 -07: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
34cbecb71f Merge "SystemUI theme feature flag" into pi-dev am: 3884e936c9
am: 2fd55ef0f3

Change-Id: I49482a8ca297b72110d8309051564bccd970b42f
2018-05-24 12:30:35 -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
Gilbert Lee
58ba33283f remove feature flag for DeviceInfoSettings in Settings
Change-Id: I2bf2e37fea936741dbf3a04ec68bf8871581df3e
Fixed: 78653510
Test: Manual
2018-05-22 09:48:54 +08: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
daa0cbc6f9 Merge "Mitigating cache corruption in ArrayMap" into pi-dev am: 841de8fb31
am: 7e69f41b55

Change-Id: I9e5e678e89961720b25488aa13e5d35ef17f1f2a
2018-05-14 16:39:21 -07: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
android-build-team Robot
596b65217e Merge "Adding batterystats history to proto dump." 2018-05-08 02:38:23 +00:00
Kweku Adams
3d16091dd2 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

This is the same change as the pi-dev one (http://ag/3909863), but due
to changes in master, that change has a merge conflict, so I have to
create a separate CL for master.

Bug: 77727638
Test: it builds
Change-Id: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
2018-05-07 17:57:42 -07: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
Howard Ro
76e3dbf0bd Merge "Re-enable the logging of APP_BREADCRUMB_REPORTED atom" into pi-dev am: 7ca1b03ece
am: e68a729b08

Change-Id: Ie15622ace2952c7ab30047b7935a1d03bfa31a1c
2018-05-07 17:12:11 -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
86187caf1b Avoid using 0 for fs-verity extension ID am: 4cf738204f
am: fed62ac9a3

Change-Id: Ic5ac29de7bdd615f7d173a6ab2e72cf34a6bca32
2018-05-02 13:57:11 -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
Victor Hsieh
2f2ced93e3 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
2018-04-20 15:45:37 -07:00
Caxton Chan
6f9ffd3b74 Merge "Enable feature flag for audio output switcher." into pi-dev am: 116e05cbba
am: fc01e133b5

Change-Id: I512891cb258131cd1b6174e60936f707f6a875a6
2018-04-16 12:50:14 -07: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
725df7a10c Merge "Convert the BrightnessController to a log scale control." into pi-dev am: 56a5620b41
am: b8a9a324f7

Change-Id: I7a6e558cb8ae9b8a065f1293380c6b899ec12c4c
2018-04-16 09:36:39 -07: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
dcc615a028 Merge "APIs to disable data usage notifications." into pi-dev am: f0b9fbebc0
am: 568a972669

Change-Id: I8bfcf47c10e5f43f963fe012e98d0afd83630e64
2018-04-11 16:51:25 -07: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
f35b79c609 Merge "API council requested tweaks to SubscriptionPlan." into pi-dev am: 5e0d360411
am: 4cd485f8e5

Change-Id: I5f3f1b04573a8a2286cf4d6456d7196fc5ed417d
2018-04-09 18:09:12 -07:00
Victor Chang
56cb29c0c3 Remove the feature flag for time zone picker
Bug: 72376227
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datetime.timezone
Test: manual
Change-Id: I4880f8e37d53879b971890a5d83ebdf1a417a262
2018-04-06 14:57:30 +01: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
Victor Hsieh
c2d78cbc78 Merge "Fix fs-verity per fs-verity spec change" into pi-dev am: 01a0288ca1
am: 943eb5a051

Change-Id: I0a4c8d6bfeedef853a864e755cb21b61b4ff80f8
2018-03-31 00:12:56 +00:00