Commit Graph

7255 Commits

Author SHA1 Message Date
Automerger Merge Worker
ec299a6717 Merge "Extract an "ArrayMapWithHistory" support class" am: 472f9b1540 am: 7546e0c520
Change-Id: Ib24daca60e5b5118f6d3728362b5ce9ed9b9878b
2019-12-19 22:58:40 +00:00
Neil Fuller
0de8726e97 Extract an "ArrayMapWithHistory" support class
Extract a simple wrapper around ArrayMap called "ArrayMapWithHistory",
with associated tests. TimeDetectorStrategyImpl and
TimeZoneDetectorStrategy were duplicating some data structure logic.

ArrayMapWithHistory works the same as ArrayMap, but there is a (mostly
hidden) history of the values for each map entry. This is useful for
debugging.

A second class, ReferenceWithHistory, has been included to support the
ArrayMapWithHistory class and for use when extending the time / time
zone detector strategy implementations: this will be useful as
additional sources like GNSS / NTP are added to time detector, and
geo-location are added to time zone detection.

Bug: 146563025
Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest com.android.server.timezonedetector
Change-Id: Ia6195cb628679a6a32c0118d2921e699514eed7d
2019-12-19 19:21:43 +00:00
Automerger Merge Worker
df3230708a Merge "Revert "Fix drag and drop (3/3)"" into qt-qpr1-dev am: 72daf56b90
Change-Id: I91e183c0313e9b0f9fff181cc34399d4bf2fd7f3
2019-12-19 10:45:57 +00:00
Automerger Merge Worker
6366a55ac8 Merge "Revert "Fix drag and drop (1/3)"" into qt-qpr1-dev am: e0f4421f23
Change-Id: I297d79d8f5262e68df0c294c938646a0acacbce8
2019-12-19 10:45:31 +00:00
TreeHugger Robot
72daf56b90 Merge "Revert "Fix drag and drop (3/3)"" into qt-qpr1-dev 2019-12-19 07:49:32 +00:00
TreeHugger Robot
e0f4421f23 Merge "Revert "Fix drag and drop (1/3)"" into qt-qpr1-dev 2019-12-19 07:49:32 +00:00
Automerger Merge Worker
7b49bf18e5 Merge "Don't depend on annotation processors XmlWriter." am: e6d84c0d97 am: f4eddd99c1
Change-Id: I5ecbf03a48eb9b50cfc06bfdbf86b20d7024e9aa
2019-12-18 08:37:18 +00:00
Treehugger Robot
e6d84c0d97 Merge "Don't depend on annotation processors XmlWriter." 2019-12-18 08:17:32 +00:00
Mathew Inwood
5249eca1bd Don't depend on annotation processors XmlWriter.
The annotation processor is being modified to produce an intermediate
output that will then be processed to produce the config that ends up on
device. As such, using XmlWriter in frameworks test code no longer makes
sense.

Instead, hard-code XML config in the test to break this problematic
dependency.

Test: atest CompatConfigTest
Change-Id: I371ba32bd83d6a84de94d594169dbb5c63f3d9be
Merged-In: I371ba32bd83d6a84de94d594169dbb5c63f3d9be
2019-12-17 16:33:09 +00:00
Automerger Merge Worker
5178397f50 Merge "Pass ApexSessionParams when submitting sessions to apex service." am: e340ecdc89 am: 359e940779
Change-Id: Idafa7a6abcc76a921c6e5f946f2e6bcdc3454f05
2019-12-17 10:51:58 +00:00
Oli Lan
e340ecdc89 Merge "Pass ApexSessionParams when submitting sessions to apex service." 2019-12-17 10:31:26 +00:00
Automerger Merge Worker
79dc4164fe Merge "Add OWNERS to biometrics projects" am: 36af0dc32e am: 57a3c9c3d1
Change-Id: I98b188d3a0e169468ea30587afb3f8ec83376026
2019-12-17 04:49:59 +00:00
Kevin Chyn
d856937569 Add OWNERS to biometrics projects
Test: Builds

Change-Id: I5979d2d22bb84cb7ada7c431a64343af9a55a4b8
2019-12-16 18:21:41 -08:00
Automerger Merge Worker
89f213f36f Merge "Fix TimeZoneDetectorStrategyTest" am: 41c13aa123 am: 87e60d5454
Change-Id: I6f7ddc9f4067fea19bb5957c8c9b3166f6f44651
2019-12-16 19:02:48 +00:00
Neil Fuller
6d84974246 Fix TimeZoneDetectorStrategyTest
Fix TimeZoneDetectorStrategyTest#testFirstPlausiblePhoneSuggestionAcceptedWhenTimeZoneUninitialized.
A test that isn't run by treehugger. Broken by commit
9a81291281.

Test: atest com.android.server.timezonedetector
Bug: 140712361
Change-Id: Id1c867caf45055c22d6b8462534624cc82032293
2019-12-16 17:17:18 +00:00
Oli Lan
285976f50d Pass ApexSessionParams when submitting sessions to apex service.
This is a minimal change to allow ApexManager to work with the apex
service API change in aosp/1189340.

Bug: 141148175
Test: atest CtsRollbackManagerHostTestCases
Test: atest CtsStagedInstallHostTestCases
Change-Id: If0065516cfb32ee6c3dcaafeae7b8546a8cae903
Merged-In: I560ee4ed6dd82277892a511909378d5a5a8502ff
2019-12-16 14:32:42 +00:00
Automerger Merge Worker
5c8eab6ae2 Merge "more precise definition for undecorated remoteviews" into qt-qpr1-dev am: 90387eb27f
Change-Id: I118196d4578af0d0c2cf426068a288dd82731aba
2019-12-14 17:01:32 +00:00
TreeHugger Robot
90387eb27f Merge "more precise definition for undecorated remoteviews" into qt-qpr1-dev 2019-12-14 16:49:31 +00:00
Chris Wren
6cbf57b4b0 more precise definition for undecorated remoteviews
Bug: 145994957
Test: atest NotificationRecordTest
Change-Id: I9427137879dc87f32231fbc5cb8ed34cf5ce787a
2019-12-13 15:42:19 -05:00
Automerger Merge Worker
85aac1d9d8 Merge "Clamp brightness thresholds to the maximum brightness." into qt-qpr1-dev am: 4274934c01
Change-Id: Ia9cac1aa7627eda8223f664d6a4a8ae1929a1e63
2019-12-12 21:52:51 +00:00
Santos Cordon
a7991ab888 Clamp brightness thresholds to the maximum brightness.
Bug: 144702254
Test: atest AutomaticBrightnessControllerTest

Change-Id: Ia8ac92cf306424d1324d028559f4260b9f80d482
Merged-In: Ia8ac92cf306424d1324d028559f4260b9f80d482
2019-12-12 12:17:02 -08:00
Automerger Merge Worker
e420bda8ba Merge "Fix TimeDetectorServiceTest permissions" am: 91270ddb55 am: eb71813814
Change-Id: Ic131db7d4353f2212f6e4b91fe7284e1cda74d11
2019-12-12 15:35:37 +00:00
Automerger Merge Worker
6281a114fa Merge "Rename SimpleTimeZoneDetectorStrategy" am: dd69aac761 am: 65eda642e7
Change-Id: I9e721dd628c4b492a8a1524415f32a1b5429e0ad
2019-12-12 14:23:27 +00:00
Neil Fuller
a140717213 Fix TimeDetectorServiceTest permissions
Fix TimeDetectorServiceTest permissions test. The suggestManualTime()
call was changed from enforceCallingPermission() to
enforceCallingOrSelfPermission() in commit 44fcf29.

Bug: 140712361
Test: atest com.android.server.timedetector
Change-Id: Ice263c7605c2ef7a04031404a25e2696f16b075c
2019-12-12 13:48:21 +00:00
Automerger Merge Worker
161d1764c8 Merge "Handle multiple phoneIds in time detection" am: 51c61e8bdb am: 1602545f28
Change-Id: I75551184a50e7bfe9cebd9b649bfd71acf5ac0f7
2019-12-12 12:27:01 +00:00
Automerger Merge Worker
896414c79d DO NOT MERGE: unrevert "Force FGS notifications to show for a minimum time" am: b0d526ac12
Change-Id: Id030fe62bd5d665e291ce6ac11b03fdaf1f2af88
2019-12-11 23:26:29 +00:00
TreeHugger Robot
e24e97f9b2 Merge "DO NOT MERGE: unrevert "Force FGS notifications to show for a minimum time"" into qt-qpr1-dev 2019-12-11 23:16:31 +00:00
Neil Fuller
19b4e5ac63 Rename SimpleTimeZoneDetectorStrategy
Rename SimpleTimeZoneDetectorStrategy to TimeZoneDetectorStrategyImpl.
Its defining characteristic is not simplicity - it's currently the
only implementation.

There are also some small cleanups around the
TimeDetectorStrategy.Callback not being needed by TimeDetectorService.

Bug: 140712361
Test: treehugger only
Change-Id: Icdf365a6a123574fb2cd21b89a9749a2f386c5fd
2019-12-10 19:15:38 +00:00
Neil Fuller
312da9b9fc Handle multiple phoneIds in time detection
Android has dual sim devices, which means multiple "phone" time
signals. NITZ is generally trusted and considered "good enough" in the
absence of better signals, but it is provided by carriers and it's not
unusual for the signals to be incorrect by minutes. We don't want the
device system clock just flicking to the latest signal received.

The changes to the SimpleTimeDetectorStrategy try to balance recency and
provide some consistency / determinism. See comments in the code for
details. The time zone detection works in a similar way, particularly
with respect to choosing the lowest phoneId in the event of a tie.

There will be a follow-up change to remove the word "Simple" from
SimpleTimeDetectorStrategy as it no longer applies.

Test: atest services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java
Test: atest android.app.timedetector
Bug: 140712361
Change-Id: I228aff8709eabfcec910af22f7ab08fee32d566a
2019-12-10 19:15:38 +00:00
Automerger Merge Worker
e08205b609 Merge "track and report packages with undecorated remoteviews" into qt-qpr1-dev am: 1eb5828022
Change-Id: I24e5eeecdac3a9d72d73fb5bca9cdc7ec202f94c
2019-12-10 18:59:17 +00:00
TreeHugger Robot
1eb5828022 Merge "track and report packages with undecorated remoteviews" into qt-qpr1-dev 2019-12-10 18:36:43 +00:00
Neil Fuller
a1842da83a Merge "Remove broadcast of NETWORK_SET_TIMEZONE intent" am: 78b90b3a76
am: 1f641b3630

Change-Id: I4d0c201fc6af3826a4427da5bc162c10bef50641
2019-12-10 09:07:13 -08:00
Treehugger Robot
78b90b3a76 Merge "Remove broadcast of NETWORK_SET_TIMEZONE intent" 2019-12-10 16:54:49 +00:00
Automerger Merge Worker
b94f85776d DO NOT MERGE Allow app switches for accessibility services am: a5b6b37c02
Change-Id: I6a257f43dfa944ab38b7ea683b03b99066c95cea
2019-12-10 05:46:39 +00:00
Evan Laird
b0d526ac12 DO NOT MERGE: unrevert "Force FGS notifications to show for a minimum time"
See CL with change id (I0680034ed9315aa2c05282524d48faaed066ebd0) for
the meaningful changes/description. This change was reverted in qt-qpr1-dev
in order to fix a bug but never got unreverted due to the qt-dev CL
having the same change-id as the reverted one.

Bug: 119041698
Test: atest NotificationManagerServiceTest
Test: atest ForegroundServiceNotificationListenerTest
Change-Id: I50f16072b0e56ab69aabf8010ffffd172ca7c05a
2019-12-09 17:15:00 -05:00
Meng Wang
e2dc83dd18 Merge "Remove usage of hidden API PhoneConstants.SUBSCRIPTION_KEY" am: 52b8e3e448
am: 45e13fcca4

Change-Id: I137e238b1b4a722d5a8931e015bf4239eb48691a
2019-12-09 13:35:05 -08:00
Meng Wang
52b8e3e448 Merge "Remove usage of hidden API PhoneConstants.SUBSCRIPTION_KEY" 2019-12-09 21:18:02 +00:00
Chris Wren
bc487b5759 track and report packages with undecorated remoteviews
print query results with:
  adb shell dumpsys notification --remote-view-stats

test the pulled atom with:
  make statsd_testdrive
  ./out/host/linux-x86/bin/statsd_testdrive 10066

Bug: 144855217
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification
Change-Id: I6dcc9871f78298a8b213a051223c7316f8feefc5
Merged-In: I773378fc7cfb47a9f9c7495404ddafa63f39cfaf
2019-12-09 15:48:14 -05:00
Arthur Hung
a9f15f0b0a Revert "Fix drag and drop (3/3)"
This reverts commit 6262f22411.

Bug: 137819199
Test: manual
Change-Id: I10800ff8f76fa68b9a93c935d14c5ade68504917
Merged-In: I10800ff8f76fa68b9a93c935d14c5ade68504917
(cherry picked from commit fd9d94d8e3)
2019-12-09 09:33:19 +00:00
Arthur Hung
bc71da4f47 Revert "Fix drag and drop (1/3)"
This reverts commit 59f532efad.

Bug: 137819199
Test: manual
Change-Id: If5e8856aad74b6f232fff9d5fd746f56d63288eb
Merged-In: If5e8856aad74b6f232fff9d5fd746f56d63288eb
(cherry picked from commit c499ad3775)
2019-12-09 09:31:45 +00:00
Shuo Qian
347e67e1a9 Merge "Make getPackagesWithPriviligesForAllActiveSubscriptions system API" am: 0024076b1a
am: bf43ca5c69

Change-Id: I441c7160fe32380d3a4172ccb6924de6faf8d3a3
2019-12-06 14:17:17 -08:00
sqian
22f5749ccc Make getPackagesWithPriviligesForAllActiveSubscriptions system API
Test: build
Bug: 145550382
Change-Id: Ia7efb9e4b22b24f3c87c7cd631548c7254b28926
Merged-In: Ia7efb9e4b22b24f3c87c7cd631548c7254b28926
(cherry picked from commit 6f27c5769d)
2019-12-06 12:07:57 -08:00
Meng Wang
dcff8689db Remove usage of hidden API PhoneConstants.SUBSCRIPTION_KEY
The extra key for subscription ID of ACTION_CARRIER_CONFIG_CHANGED is
CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX.

Bug: 140908357
Test: make
Change-Id: I437ebf67bd27e2ac69b2b7784d98d7683350652c
Merged-In: I437ebf67bd27e2ac69b2b7784d98d7683350652c
2019-12-06 11:44:16 -08:00
Neil Fuller
c186f60e8c Merge "TimeDetector improvements" am: 6e3020490d
am: c72f796176

Change-Id: I76a5726953cd6dc7998e298c9d41e86a3b4f7c00
2019-12-06 04:08:26 -08:00
Neil Fuller
6e3020490d Merge "TimeDetector improvements" 2019-12-06 11:53:14 +00:00
Neil Fuller
ee036c7535 Merge "Add suggestManualTimeZoneSuggestion to the client" am: 63d5f12489
am: 2447fe6f69

Change-Id: I2ecb6991ee2fce6b4d79164f4fd7dd568042db4f
2019-12-05 06:09:31 -08:00
Neil Fuller
63d5f12489 Merge "Add suggestManualTimeZoneSuggestion to the client" 2019-12-05 13:51:34 +00:00
Neil Fuller
9a81291281 Remove broadcast of NETWORK_SET_TIMEZONE intent
android.intent.action.NETWORK_SET_TIMEZONE is not used by anything in
the platform so it can be removed. It was previously broadcast when
telephony made a time zone change, presumably as a way to coordinate
time zone detection logic if there were other, lower-priority detection
mechanisms on the device. The logic for time zone detection is now
centralized in the system server so coordination can be done more
directly when needed.

All the APK usages appear to be only manifest entries for
<protected-broadcast> in apps that don't send the intent themselves,
which doesn't make a lot of sense.

Note: There is a separate commit to remove the broadcast from the old
(disabled) NITZ logic.

Bug: 140712361
Test: treehugger
Change-Id: Iab629778e45815f4632359e90d920b7751c1a199
2019-12-05 13:09:19 +00:00
Anna Trostanetski
76ba40cc64 Merge "Add descriptions to compat changes." am: b38db5afe0
am: d54f52b9ea

Change-Id: I72ebf645c756df7aab326669f5ac5e5edbbcc640
2019-12-05 04:36:25 -08:00
Neil Fuller
106f18a666 Add suggestManualTimeZoneSuggestion to the client
Add TimeZoneDetector.suggestManualTimeZone() to set the time zone
"manually" and switch the device policy manager code over to using
it.

Add RequiredPermission annotations to TimeZoneDetector while there.

Bug: 140712361
Test: treehugger only
Test: atest services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Change-Id: Id247fddfdd793732dd88294ee215eda37cd0be4c
2019-12-05 12:12:14 +00:00