Commit Graph

21444 Commits

Author SHA1 Message Date
TreeHugger Robot
3624ed78fd Merge "Enforce permissions check in getLastTimeAnyComponentUsed" into sc-dev am: dbdd7012bc am: 29f69e43bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15084728

Change-Id: Ib176042519dd83be639f7fb5ee87c83297123c0f
2021-06-24 06:51:19 +00:00
Zhen Zhang
bdac90593f Enforce permissions check in getLastTimeAnyComponentUsed
Enforce the permission check for both INTERACT_ACROSS_USERS and
PACKAGE_USAGE_STATS permissions.

Bug: 191382775
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Change-Id: I1371070478306005b2b4a59a1bc794bc368ae0c4
2021-06-23 16:34:50 -07:00
Nate Myren
0b7aa98e36 Merge "Create Attribution Chains in HistoricalOps" into sc-dev am: 3e51f7cabd am: 0cf659377d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14963609

Change-Id: Ifce9b0987dbc06b601d59f4c0b514aae75440efe
2021-06-23 21:54:33 +00:00
Nate Myren
3e51f7cabd Merge "Create Attribution Chains in HistoricalOps" into sc-dev 2021-06-23 21:23:19 +00:00
TreeHugger Robot
b71ae214c3 Merge "[pm] drop non-APK paths from LoadedApk makePath" into sc-dev am: 56b4df6954 am: 432e940b37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15067342

Change-Id: Ia827ab916d23c7c73b9d004d35c44fb7df73c386
2021-06-23 20:50:47 +00:00
TreeHugger Robot
56b4df6954 Merge "[pm] drop non-APK paths from LoadedApk makePath" into sc-dev 2021-06-23 20:19:32 +00:00
Lucas Dupin
5351142a23 Merge "Correctly serialize population" into sc-dev am: ba23b84687 am: 38439e2586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15081291

Change-Id: Ie3113261d1a801cab21fe2c2faf67a743b500cd9
2021-06-23 19:25:41 +00:00
Nate Myren
fd49debdc0 Create Attribution Chains in HistoricalOps
Add a historical flag to signify that attribution chains should be
assembled. Assemble the chains, filter out middle nodes, and attach the
last visible node to the start as a proxy info

Bug: 158792096
Test: manual
Change-Id: I8fbd8f438c62b28fd90039440e86224c624dea79
2021-06-23 12:12:15 -07:00
Lucas Dupin
ebd663f556 Correctly serialize population
All populations were being set to 0, causing all colors to be wrong.

Test: manual
Bug: 191391779
Bug: 191374703
Change-Id: Id5bef180ca3e6f30e30631781a74b2efb4402ac5
2021-06-23 09:30:24 -07:00
Songchun Fan
fece532bbf [pm] drop non-APK paths from LoadedApk makePath
After the introduction of the uses-native-library tag,
sharedLibraryFiles might contain native library names such as
"lib_aion_buffer.so". The old method makePath in the LoadedApk class was
looking for APK paths under the assumption that all the paths in
sharedLibraryFiles are APK paths. Parsing on the results of makePaths
could lead to app crashes because the results are not valid APK paths.
This CL fixes that.

BUG: 190787130
Test: manual
Change-Id: I2b3d439f8edda7ef27e1106046cf8c0b88d755d9
2021-06-22 11:22:31 -07:00
Jeff DeCew
95fcc3a04d Merge "Fix a security exception breaking notification inflation." into sc-dev am: f24e216a60 am: 1fea707ed7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15038412

Change-Id: Id6917e4c39698da8b46c43b591e64e2962ea35c4
2021-06-22 13:53:39 +00:00
Jeff DeCew
f24e216a60 Merge "Fix a security exception breaking notification inflation." into sc-dev 2021-06-22 13:40:35 +00:00
James O'Leary
d14ee556e1 Merge "Update serialization of WallpaperColors" into sc-dev am: 6aad992ea5 am: e323db126a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15031797

Change-Id: I58d9a096a27feba882c2624d69183d8f66839289
2021-06-22 03:07:03 +00:00
James O'Leary
6aad992ea5 Merge "Update serialization of WallpaperColors" into sc-dev 2021-06-22 02:48:57 +00:00
Lee Shombert
e0bb51a07a Merge "Modify PropertyInvalidatedCache" into sc-dev am: c1ad465c8a am: 991c66f95e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14922569

Change-Id: I76c7795e2fb04bb015ba8e9f941f637bbea71f07
2021-06-21 23:36:02 +00:00
Lee Shombert
c1ad465c8a Merge "Modify PropertyInvalidatedCache" into sc-dev 2021-06-21 23:03:18 +00:00
Lee Shombert
659dcc86a3 Modify PropertyInvalidatedCache
Bug: 186778818

This makes two changes to PropertyInvalidatedCache.

1. disableLocal() now disables all current and future caches that use
   the same name (not the necessarily the same property) , in the
   local process.  Previously, disableLocal() only disabled a single
   cache instance, but the intent was always to disable all instances
   of the same cache in the process.

   disableInstance() is available with the old behavior.

2. A bypass() method has been added.  If bypass() returns true,
   query() will skip the cache and go straight to the binder call as
   though the cache had been disabled.  The default implementation
   always returns false.  Caches can override the implementation to
   avoid caching selected queries.

These changes specifically address the problem of caches that are
created dynamically and which should be disabled in the local
process.

A unit-test is added for PropertyInvalidatedCache.  This is not a
complete test because test processes are not allowed to set system
properties.  The unit-test will be improved in the future by modifying
PropertyInvalidatedCache to use an invalidation mechanism other than
system properties.

Manual test: boot a phone with a baseline build and with the build
under test and verified that the list of disabled caches is the same.
Use 'dumpsys cacheinfo' to get the cache status.

Test: atest
 * FrameworksServicesTests:UserManagerServiceCreateProfileTest

Change-Id: I9f604b872911290e4e3d8a58b3e28e328b2000a9
2021-06-21 13:49:29 -07:00
Jeff DeCew
b1def70e00 Fix a security exception breaking notification inflation.
Fixes: 188595459
Test: manual testing that snooze continues to work under basic circumstances.
Change-Id: Ic1e2dcf3d70d5bc0174254c2f5acba25a459d62b
2021-06-21 16:41:41 -04:00
Makoto Onuki
6b232e5387 Merge "Update the javadoc around FGS" into sc-dev am: d97f509923 am: 17bc1b1372
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14941110

Change-Id: I9179a21048535257718820123d94a2507fdc22ef
2021-06-21 20:21:14 +00:00
Makoto Onuki
d97f509923 Merge "Update the javadoc around FGS" into sc-dev 2021-06-21 18:04:37 +00:00
Amith Yamasani
018cc148e9 Merge "Mark all published authorities for a provider as ready" into sc-dev am: d39b5f032c am: fd7c786e1d am: b47e7815ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15019800

Change-Id: Iee06f886c5eecba0f963e74b12a5514384435181
2021-06-21 17:48:53 +00:00
Amith Yamasani
b47e7815ad Merge "Mark all published authorities for a provider as ready" into sc-dev am: d39b5f032c am: fd7c786e1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15019800

Change-Id: I9b3d10a8b646bf70c0912fecf161e52d34b9eaf9
2021-06-21 16:32:18 +00:00
Amith Yamasani
fd7c786e1d Merge "Mark all published authorities for a provider as ready" into sc-dev am: d39b5f032c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15019800

Change-Id: Ib63f630c6ee65fa22697bebdcb1f21a261c92882
2021-06-21 16:31:40 +00:00
Amith Yamasani
d39b5f032c Merge "Mark all published authorities for a provider as ready" into sc-dev 2021-06-21 16:31:09 +00:00
Rubin Xu
387668c00f Merge "DPM.isUsbDataSignalingEnabled() callable on unmanaged device" into sc-dev am: 3c0f63ab97 am: 97fdd9f018
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15042814

Change-Id: I859cb4baa91173e7bc183279b7bbeb20b39da10d
2021-06-21 16:31:00 +00:00
Rubin Xu
70ccf3f0cb Merge "DPM.isUsbDataSignalingEnabled() callable on unmanaged device" into sc-dev am: 3c0f63ab97 am: faf5c5cd3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15042814

Change-Id: I48c5d123573c7588f54ac239edcb234597f58fff
2021-06-21 16:30:48 +00:00
Rubin Xu
97fdd9f018 Merge "DPM.isUsbDataSignalingEnabled() callable on unmanaged device" into sc-dev am: 3c0f63ab97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15042814

Change-Id: I126b354fd9a4ddb81163457d62843212fdd45e71
2021-06-21 15:35:12 +00:00
Rubin Xu
3c0f63ab97 Merge "DPM.isUsbDataSignalingEnabled() callable on unmanaged device" into sc-dev 2021-06-21 15:19:40 +00:00
Rubin Xu
b4fe247823 DPM.isUsbDataSignalingEnabled() callable on unmanaged device
Fix an issue in existing implementation where the API will
throw exception when called on a device without DO or PO: a
slight tweak of semantics such that when the API is called by
a regular app, return the device-wide policy regardless which
user the caller is from.

Bug: 190024751
Test: manual with modifed TestDPC on unmanaged device.
Change-Id: I227d01ec275bc0a074a3789bab194c76fc72b5b8
2021-06-21 13:39:11 +01:00
Yan Zhu
7710d5ad9e Merge "Improve restriction for BugreportManagerService for multi-user" into sc-dev am: 38b64a51a5 am: 081808bc18
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14878617

Change-Id: I447d24876266facc430cb49706ed4ab1659888ab
2021-06-21 12:07:16 +00:00
Yan Zhu
081808bc18 Merge "Improve restriction for BugreportManagerService for multi-user" into sc-dev am: 38b64a51a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14878617

Change-Id: I56b45102e59a9101faff85d2150effdc57f0f69c
2021-06-21 11:59:52 +00:00
Charles Chen
9d590229b3 Merge changes from topic "ime_migration" into sc-v2-dev am: 235a0bf9bd am: d5b2c15ace
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14716057

Change-Id: I4303a7207004eb8d8611ef594c107f1fc16d5932
2021-06-21 09:26:00 +00:00
Charles Chen
d51e70f276 Migrate InputMethodService to WindowProviderService am: fc7a1b5b34 am: 3e85eb66f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14597714

Change-Id: I5107af6cf95f26d74752ce4917552dbe2d422fa3
2021-06-21 09:25:54 +00:00
Charles Chen
d5b2c15ace Merge changes from topic "ime_migration" into sc-v2-dev am: 235a0bf9bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14716057

Change-Id: I1c970b74997edb8a42211af5201933f5f5eb1ee9
2021-06-21 09:08:45 +00:00
Charles Chen
3e85eb66f4 Migrate InputMethodService to WindowProviderService am: fc7a1b5b34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14597714

Change-Id: I0f7ef087d7c09605d2ae18264dea754fe68d0689
2021-06-21 09:08:35 +00:00
Charles Chen
235a0bf9bd Merge changes from topic "ime_migration" into sc-v2-dev
* changes:
  Move IME log to WindowTokenClient
  Migrate InputMethodService to WindowProviderService
2021-06-21 08:46:33 +00:00
Amith Yamasani
e7f966d559 Mark all published authorities for a provider as ready
There could be more than one authority in a published provider.
Make sure the waiting acquireProvider() calls are notified
for each of the published authorities.

Fixes: 186333995
Test: atest MultiAuthorityTest
      Manual: Start a work profile app while work profile is stopped
      Verify that the app starts faster than the 20 second
      timeout for acquireProvider()
Change-Id: Iaad58949debeead6ea477aa440b13ba4ddc1198e
2021-06-20 22:23:09 -07:00
Yan Zhu
0ce734f509 Merge "Improve restriction for BugreportManagerService for multi-user" into sc-dev am: 38b64a51a5 am: dfa489223d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14878617

Change-Id: I2a684314d318860af01df85d23dc4d959d0c72de
2021-06-19 17:42:22 +00:00
Yan Zhu
38b64a51a5 Merge "Improve restriction for BugreportManagerService for multi-user" into sc-dev 2021-06-19 17:17:08 +00:00
Santiago Etchebehere
3af6019b81 Update serialization of WallpaperColors
Do not assume mMainColors and mAllColors contain the same
color since recent changes modified that.
Update equals and hashCode as well to account for this.

Bug: 191391779
Bug: 191374703
Test: atest WallpaperColorsTest
Change-Id: I8c7775055a2360ec3a91cee76a42d14a143ec7fb
2021-06-18 16:56:30 -07:00
Jeff DeCew
c1f33694bc Use the accent color for colorized notifications with COLOR_DEFAULT
Fixes: 187508265
Test: manual
Change-Id: I2707468694c4932a8201bb8414637d8c2640caca
2021-06-18 13:37:22 +00:00
Charles Chen
e74f791505 Merge "Handle WindowProviderService#onConfigurationChanged" into sc-v2-dev am: 41fc06529b am: 5a1e90d872
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14550549

Change-Id: I52a9eb5cef26f822dca03a13c5605e214714e444
2021-06-18 06:57:02 +00:00
Charles Chen
5a1e90d872 Merge "Handle WindowProviderService#onConfigurationChanged" into sc-v2-dev am: 41fc06529b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14550549

Change-Id: I9d6656b2f4bd55a1d45bb1c3fba7eca29d44865c
2021-06-18 06:47:48 +00:00
Charles Chen
41fc06529b Merge "Handle WindowProviderService#onConfigurationChanged" into sc-v2-dev 2021-06-18 06:37:49 +00:00
Charles Chen
79cb3c5288 Move IME log to WindowTokenClient
IMF has the requirement to debug if the configuration is dispatched
to InputMethodService. Since we migrated InputMethodService to
WindowProviderService, we should also move the debug logic to
WindowContext module because config updates will be no longer from
ActivityThread.

Test: build & run
Bug: 135719017
Change-Id: I248c90f36249a6a4537228f7b0204f0d4466ebc7
2021-06-18 11:45:05 +08:00
Charles Chen
fc7a1b5b34 Migrate InputMethodService to WindowProviderService
Also introduce IWindowManager#getDisplayIdToLaunchIme to make IMS
be aware of the launched display to prevent extra onConfigurationChanged
callback

Bug: 149463653
Test: atest MultiDisplaySystemDecorationTests CtsInputMethodTestCases
Test: atest ContextTest ContextIsUiContextTest
Test: manual - moving IME between 2 displays and displayArea within
      display - config change received
Test: manual - the app to show IME crashed and focus is set to the
      next task - no config change

Change-Id: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
2021-06-18 11:44:30 +08:00
Charles Chen
0a3126f408 Handle WindowProviderService#onConfigurationChanged
This CL makes WindowProviderService receive onConfigurationChanged
callback when there's a config update from WM side.

Test: atest WindowContextTests
Test: atest ActivityThreadTest ActivityClientTest ConfigurationHelperTest
fixes: 185766946

Change-Id: I922d52c1c38aecc1a948c79039cc03354adc646f
2021-06-18 11:44:20 +08:00
Julia Reynolds
5256249d8b Merge "Store DND rule owners" into sc-dev am: 6b1067a79f am: 0e915160f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002286

Change-Id: Ib8df9be37e1957f4a02767f7ce078ea00fe37105
2021-06-17 20:01:40 +00:00
Julia Reynolds
019305fb09 Merge "Store DND rule owners" into sc-dev am: 6b1067a79f am: 3cc6d05598
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002286

Change-Id: Ia94d0ac6d3e08594569a4a48f3574091956deb75
2021-06-17 19:55:13 +00:00
Julia Reynolds
3cc6d05598 Merge "Store DND rule owners" into sc-dev am: 6b1067a79f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002286

Change-Id: I2dcd420ebcb74aaba93230df93ae02f0aa9415c8
2021-06-17 19:42:14 +00:00