Commit Graph

24164 Commits

Author SHA1 Message Date
Lee Shombert
0c76fb1185 Merge "Refactor PropertyInvalidatedCache locks" into tm-qpr-dev am: ab5c609adb am: 21085953e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19903012

Change-Id: I756ac1192fdbefe56d82fb3334bbe2ef1a0cf730
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 16:29:08 +00:00
Lee Shombert
21085953e7 Merge "Refactor PropertyInvalidatedCache locks" into tm-qpr-dev am: ab5c609adb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19903012

Change-Id: Ic9e62660a7e336afff16eb3cb50e682f7be44067
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 15:57:26 +00:00
Zimuzo Ezeozue
c8287e3b44 Merge "Clean up binder txn tracking special case" 2022-09-15 07:29:07 +00:00
TreeHugger Robot
830d58784a Merge "Add shouldForceCollectOp to appOpInfo" 2022-09-15 05:22:31 +00:00
Lili Zou
0db6084004 Merge "Unhide constant AmbientContextEvent.EVENT_BACK_DOUBLE_TAP." 2022-09-15 05:20:49 +00:00
Lee Shombert
a6b4f410f2 Refactor PropertyInvalidatedCache locks
Bug: 241763149

Refactor the sCorkLock into sCorkLock, which protects code that
specifically supports corking, and sGlobalLock, which protects all
other code that touches global objects (like the list of all caches).

Deadlock was not actually observed in the bug and has never been
reported, but the possibility was identified and is being fixed here.

Bypass the bulk of disableLocal(name) if the name has already been
bypassed.  This speeds repeated calls to disableLocal() by not
iterating over sCaches.

Many threads were terminated by a watchdog while iterating over
sCaches inside disableLocal().  It is not known why this block of code
was running so often when the time out expired.

An open question is whether or not disabled caches should be removed
from the sCaches array.  The only reason to leave them in the array is
to report on them during dumpsys, but this seems like a small benefit

Test: atest
 * FrameworksCoreTests:IpcDataCacheTest
 * FrameworksCoreTests:PropertyInvalidatedCacheTests
 * CtsOsTestCases:IpcDataCacheTest
Change-Id: I4c298f380044c0be93cdb47d66d7d7e2b260004f
2022-09-14 23:59:46 +00:00
Nate Myren
9453f928c8 Add shouldForceCollectOp to appOpInfo
This allows us to manually specify which app op should have noteOp
events collected for them, if applicable

Bug: 44518166
Test: manual
Change-Id: I3988679fd9b8ccedde37a47cacc0ac2c276b78e6
2022-09-14 16:14:27 -07:00
Sam Saccone
ae74c8cc34 Merge "Revert "Verify that the component is exported"" 2022-09-14 23:11:10 +00:00
Domen Su
d84de83dcd Revert "Verify that the component is exported"
Revert submission 19776394-safer-implicit-intents

Reason for revert: DroidMonitor: Potential culprit for Bug b/246818637 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
I66227a4fa:Update PackageManager test in Car to adapt to safe...
I779f3d6ee:CTS tests for safer implicit intents
I41c48a412:Verify that the component is exported

Change-Id: I8484d317afc9a1d845b3394828062615b5fd2066
2022-09-14 22:49:12 +00:00
Treehugger Robot
05156295d8 Merge "Fix error log message for rename(2) workaround" am: 4ed8f88e27 am: b9d3702636 am: 095a630735 am: 1d028b0638 am: 943c159a3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2205599

Change-Id: Ic593adc6112f41e7f2cf043be1ea93aa8ec4f3c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 20:49:00 +00:00
Christophe Pinelli
44c0ac96b9 Merge "Verify that the component is exported" 2022-09-14 17:03:56 +00:00
Lili Zou
09e6beedf5 Unhide constant AmbientContextEvent.EVENT_BACK_DOUBLE_TAP.
Test: local build mma
Test: "atest CtsAmbientContextServiceTestCases",
Test: "atest FrameworksServicesTests:AmbientContextManagerServiceTest"
BUG: 242480433
Change-Id: I0c73ad5d416523cdb90300c8aa00ad22f901342d
2022-09-14 10:08:18 +08:00
Treehugger Robot
943c159a3a Merge "Fix error log message for rename(2) workaround" am: 4ed8f88e27 am: b9d3702636 am: 095a630735 am: 1d028b0638
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2205599

Change-Id: If41a6e82816609a1fd3c9e0b345c32476cf66b89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 23:34:51 +00:00
Treehugger Robot
1d028b0638 Merge "Fix error log message for rename(2) workaround" am: 4ed8f88e27 am: b9d3702636 am: 095a630735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2205599

Change-Id: I5dee42414f2f57d4e094052e835f8d9fff233be1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 23:05:34 +00:00
Treehugger Robot
095a630735 Merge "Fix error log message for rename(2) workaround" am: 4ed8f88e27 am: b9d3702636
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2205599

Change-Id: I9a2bdfbdce92d1e1869e87344ecf032524576006
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 22:38:11 +00:00
Zim
fe43ff2732 Clean up binder txn tracking special case
Previously, binder txns were only traced for txns from sysui/launcher
to system_server.

ag/Iffc4bb534d239c07d2e4d43ab43a9ed76abe7496 enabled binder txn tracking
more broadly

Removed the special case for sysui/launcher and cleaned up the code

Test: Manual
Bug: 161393989
Change-Id: I9d46d2362ca0ca33bc2477d68092f7ba5fe9c8ac
2022-09-13 15:18:55 +01:00
Han Wang
b18b1084b3 Fix error log message for rename(2) workaround
Change-Id: I36e8bf415a767078e9c5e8fa0c93d608711d8882
2022-09-13 13:45:13 +00:00
TreeHugger Robot
4fadc17018 Merge "Only use return transition when requested." into tm-qpr-dev am: efff8e9f03 am: b1b41f1887
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19682832

Change-Id: Ia35e92375d0305e078caaccd290357017490fbbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-10 01:04:50 +00:00
TreeHugger Robot
b1b41f1887 Merge "Only use return transition when requested." into tm-qpr-dev am: efff8e9f03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19682832

Change-Id: Iaa38ede6dd41b165b2690ac46ce7ffd3fb9d5a86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-10 00:34:39 +00:00
TreeHugger Robot
efff8e9f03 Merge "Only use return transition when requested." into tm-qpr-dev 2022-09-10 00:00:16 +00:00
TreeHugger Robot
863434e464 Merge "Change getWifiSsidPolicy Java Doc" 2022-09-09 22:16:02 +00:00
Stephanie Bak
c5cf42ba17 Change getWifiSsidPolicy Java Doc
Reflect the QUERY_ADMIN_POLICY permission check instead of System app
check in the Java doc.

Bug: 239984134
Test: N/A - just documentation change
Change-Id: I49d6b757214fde216da5b7ac7624107e3488ef77
2022-09-09 20:34:53 +00:00
Eghosa Ewansiha-Vlachavas
27aa6353cf Merge "Remove ownerName from DPMS.setProfileOwner arguments" 2022-09-09 06:53:30 +00:00
Julia Reynolds
8de370b1b1 Merge "Fix NPE" into tm-qpr-dev am: 6527863444 am: d0b638b428
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19868481

Change-Id: I2f94ccbc9df334ce2fb7bbdbb68239ab50cc8f88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 15:01:04 +00:00
Julia Reynolds
d0b638b428 Merge "Fix NPE" into tm-qpr-dev am: 6527863444
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19868481

Change-Id: I068ec4e53fbed1368bbc90e7a720bb974abab55e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-08 14:28:25 +00:00
Julia Reynolds
6527863444 Merge "Fix NPE" into tm-qpr-dev 2022-09-08 14:01:08 +00:00
Alex Johnston
af7d9b6c3c Merge "Remove ownerName as argument in DPMS.setDeviceOwner" 2022-09-08 09:49:40 +00:00
Riddle Hsu
48d11607a9 Merge "Apply override scale from entry points on client" 2022-09-08 03:35:48 +00:00
Nate Myren
4eee5b0566 Merge "Add WATCHABLE_NON_PERMISSION_OPS to AppOpsService" 2022-09-07 21:50:42 +00:00
Jeff Sharkey
e4bcf758c9 Merge changes from topic "sep2"
* changes:
  [8/?] Reduce BroadcastQueue interface complexity.
  BroadcastQueue: factor out historical broadcasts.
  [7/?] Reduce BroadcastQueue interface complexity.
  BroadcastQueue: offer to wait for a barrier.
2022-09-07 18:03:10 +00:00
Yuri Lin
e53f8dd450 Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-dev am: de7b49d170 am: bb36470dd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19816377

Change-Id: I290e406bf21a297f5025b13a038e9333a592c2c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 23:49:48 +00:00
Yuri Lin
bb36470dd7 Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-dev am: de7b49d170
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19816377

Change-Id: I8e5403cb24fa43ff6bedadab41d14470c1884b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 23:22:43 +00:00
Nate Myren
8ecc69ffca Add WATCHABLE_NON_PERMISSION_OPS to AppOpsService
Add a list of app ops that are not tied to a permission, but should have
note events sent to users. Also add RECEIVE_AMBIENT_TRIGGER_AUDIO to
systemApi

Fixes: 44518166
Test: manual
Change-Id: Iff9d3f5a75bee0a65be6cbb0eaa5151d81f8902a
2022-09-06 23:20:53 +00:00
Yuri Lin
2e43eaccbb Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-dev am: de7b49d170
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19816377

Change-Id: Id5f7ee436a18d66ea17e1881f05ed029f65412f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 23:19:01 +00:00
Julia Reynolds
6f02c07176 Fix NPE
Test: NotificationChannelGroupTest
Test: view notification settings for an app that doesn't use groups
Fixes: 244574602
Bug: 241764350
Bug: 241764340
Bug: 241764135
Bug: 242702935
Bug: 242703118
Bug: 242703202
Bug: 242702851
Bug: 242703217
Bug: 242703556
Change-Id: I9c681106f6d645e62b0e44903d40aa523fee0e95
2022-09-06 17:49:18 -04:00
Eghosa Ewansiha-Vlachavas
c98b918225 Remove ownerName as argument in DPMS.setDeviceOwner
As ownerName has been removed from OwnersData.ownerInfo, there is no need to take
it as an argument in DPMS.setDeviceOwener or for any other methods that
call it.

Bug: 240562946
Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest SetDeviceownerPolicyTaskTest
Change-Id: I7748a5cf152e9327854623fbac5f8ed3f5d3f28a
2022-09-06 12:19:45 +00:00
Eghosa Ewansiha-Vlachavas
b22f1ed0a2 Remove ownerName from DPMS.setProfileOwner arguments
As ownerName is no longer a parameter of OwnersData.ownerInfo, it can
be removed as a argument from setProfileOwner().

Bug: 240562946
Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ie996174f442db3406b6d5122d17ce127f4d6554c
2022-09-06 09:34:00 +00:00
Jeff Sharkey
715d62fd96 [7/?] Reduce BroadcastQueue interface complexity.
Converge towards always using IApplicationThread to identify the
remote caller that is finishing a broadcast.  This pivot will enable
us to scale nicely to our future redesigned per-app stack, since that
will still only ever dispatch a single broadcast per app.

Add explicit setCurrent() and clearCurrent() methods to ensure that
all BroadcastRecord fields are updated consistently.

Bug: 243656033
Test: atest CtsContentTestCases:BroadcastReceiverTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Change-Id: I3db8382798bb25fabe20aa9864cf6f8831b64371
2022-09-02 14:37:09 -06:00
Caitlin Shkuratov
b6e33a1c16 Merge "[Disable Flags] Move DisableFlagsLogger to the disableflags package." 2022-09-02 14:33:07 +00:00
Pavel Grafov
62291e970b Merge "Handle exception thrown by KCS.setGrant()" 2022-09-02 09:28:55 +00:00
Chun-Wei Wang
266bef4617 Merge "Include dependency packages in RunningAppProcessInfo" 2022-09-02 07:09:51 +00:00
JW Wang
b8a9b524f2 Include dependency packages in RunningAppProcessInfo
So we have a complete picture about all packages loaded into a process.
This will be used to check if installing a package causes a process to
be killed.

Note if pkgList or pkgDeps contain the package to be installed, the process
will be killed during install.

Bug: 235306967
Test: m
Change-Id: I052185f8d54717e65fa1fddaa42ca80ebbf15a5d
2022-09-02 09:08:04 +08:00
TreeHugger Robot
684dc6bda1 Merge "Update TaskFragmentToken for Activity relaunch" into tm-qpr-dev am: 379c38b1ae am: de4ca9845c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19707668

Change-Id: Ic8407732ba353215b6e466247d1e8710bf59b51a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 22:47:01 +00:00
TreeHugger Robot
de4ca9845c Merge "Update TaskFragmentToken for Activity relaunch" into tm-qpr-dev am: 379c38b1ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19707668

Change-Id: Ief7239f819fc1babade677aca230c2df93ad5a72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 22:17:20 +00:00
TreeHugger Robot
379c38b1ae Merge "Update TaskFragmentToken for Activity relaunch" into tm-qpr-dev 2022-09-01 21:51:47 +00:00
Caitlin Shkuratov
f9288d1d2a [Disable Flags] Move DisableFlagsLogger to the disableflags package.
disableflags package was created by ag/19795082.

Bug: 240590557
Test: atest SystemUITests
Test: manual: Verify we still get disable state logs
Change-Id: Ia02ba83e653197e4c77deb5cd7db1e805914e340
2022-09-01 20:45:32 +00:00
Yuri Lin
144337d92a Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-qpr-dev am: f5f9c1ec1d am: 9bed5947c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19794266

Change-Id: I416e1bae50d3be388bb2c38314ead4bf86d1316d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 20:07:25 +00:00
Darrell Shi
d5d2cbc7f1 Merge "Add hidden system dream API in DreamManagerService." into tm-qpr-dev am: 68e81c211e am: ec6724232e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19461449

Change-Id: Ic1de0271fa2afa7185b31472afb45424f88eaa57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 19:51:57 +00:00
Yuri Lin
9bed5947c0 Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-qpr-dev am: f5f9c1ec1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19794266

Change-Id: Icbf3cd03cd1ede0817e7c23596861c070781c34c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 19:50:54 +00:00
Yuri Lin
d4b5212eb6 Trim any long string inputs that come in to AutomaticZenRule
This change both prevents any rules from being unable to be written to disk and also avoids risk of running out of memory while handling all the zen rules.

Bug: 242703460
Bug: 242703505
Bug: 242703780
Bug: 242704043
Bug: 243794204
Test: cts AutomaticZenRuleTest; atest android.app.AutomaticZenRuleTest; manually confirmed each exploit example either saves the rule successfully with a truncated string (in the case of name & conditionId) or may fail to save the rule at all (if the owner/configactivity is invalid). Additionally ran the memory-exhausting PoC without device crashes.

Change-Id: I110172a43f28528dd274b3b346eb29c3796ff2c6
Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6
(cherry picked from commit de172ba0d4)
2022-09-01 18:48:34 +00:00