Commit Graph

23696 Commits

Author SHA1 Message Date
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
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
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
Han Wang
b18b1084b3 Fix error log message for rename(2) workaround
Change-Id: I36e8bf415a767078e9c5e8fa0c93d608711d8882
2022-09-13 13:45:13 +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
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
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
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
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
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
Yuri Lin
f5f9c1ec1d Merge "Trim any long string inputs that come in to AutomaticZenRule" into tm-qpr-dev 2022-09-01 18:47:55 +00:00
Darrell Shi
ec6724232e Merge "Add hidden system dream API in DreamManagerService." into tm-qpr-dev am: 68e81c211e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19461449

Change-Id: I11f43a63201a0f56f8f61c56012d2f4fcaf69abe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 16:49:50 +00:00
Darrell Shi
68e81c211e Merge "Add hidden system dream API in DreamManagerService." into tm-qpr-dev 2022-09-01 16:41:32 +00:00
Yuri Lin
de172ba0d4 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
2022-08-31 14:59:18 -04:00
Lili Zou
578c374311 Merge "AmbientContextManager API changes to support quick-tap detection" into tm-qpr-dev am: 7b21fb6b4a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19753874

Change-Id: Ife7c05da34d53e35140464570f4ba78530a614d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 14:00:51 +00:00
Chris Li
f1bf8d6d9d Update TaskFragmentToken for Activity relaunch
Before, we store the TaskFragmentToken in ActivityClientRecord from
LaunchActivityItem, which won't update if the Activity is relaunched.
Now, we update the token when the activity is reparented to make sure
the token is up-to-date when relaunched.

Also make sure that when activity is destroyed, it is no longer
available using SplitController#getContainerWithActivity(Activity).

Bug: 243330085
Test: atest WMJetpackUnitTests:TaskFragmentContainerTest
Change-Id: I37f1a442c6f1bfb40f04f61eb4f9a3d8d09733ee
2022-08-31 11:37:17 +08:00
Lili Zou
81f52b053d AmbientContextManager API changes to support quick-tap detection
Test: "atest CtsAmbientContextServiceTestCases", "atest FrameworksServicesTests:AmbientContextManagerServiceTest"
BUG: 242480433
Ignore-AOSP-First: to prevent new feature leak.

Change-Id: If445894f0d68fbb336156d2817e0dea884182a10
2022-08-31 02:28:09 +00:00
Darrell Shi
3c94bacacd Add hidden system dream API in DreamManagerService.
This change
- adds a new private API in dream manager that allows a client with
  write dream permission to set a system dream component, which takes
  precedence over user configured dream
- fixes startDream() API in DreamManager which shouldn't take in a
  component name

Test: atest SystemDreamTest
Bug: 222529147
Change-Id: Iee9a0af1071e5ed57fa5bd4b0d06d8178118116e
2022-08-30 23:19:44 +00:00
Cole Faust
9b3a5fc03b Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564 am: 6a79ae2567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I7052a1f7391ed6701fe0e1036c27368609032e35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 20:44:00 +00:00
Cole Faust
6a79ae2567 Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I931e692e6d170d19a7492e44cc1333c10e96c897
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 20:00:09 +00:00
Cole Faust
91d6c5b564 Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: Icfb700330d9a9cd0a592b76c9e4cf4a8bcd19c30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 19:01:56 +00:00
Cole Faust
a1eb8cf128 Merge "Fix array-related errorprone warnings" 2022-08-30 18:03:01 +00:00
Lili Zou
a98765cb86 Merge "Fix shell command bugs for supporting CTS test. Add service unit test. Fix javadoc." into tm-qpr-dev am: b2f2546b5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19751510

Change-Id: I0ffc853aa8b2700c8a7f1f65f53c23d38f665a2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 15:23:28 +00:00
Kathy Chen
7a168cc8c1 Fix shell command bugs for supporting CTS test. Add service unit test. Fix javadoc.
Test: unit test and cts test
Ignore-AOSP-First: confidential feature
BUG: 242480433
Change-Id: I0fd2950eea267d56fbd8e89ecc52fdd590992e75
Merged-In: I0fd2950eea267d56fbd8e89ecc52fdd590992e75
(cherry picked from commit 44eafb8f58)
2022-08-30 02:37:59 +00:00
Treehugger Robot
e9712ca91b Merge "Exclude large tests from presubmit." am: 3d8681e31d am: 9dc9fd8930 am: 5860c207c9 am: da40df7c95
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2176682

Change-Id: I56d7b99eab9acc055a6935166f962d10e6df357c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-29 22:35:54 +00:00
Treehugger Robot
da40df7c95 Merge "Exclude large tests from presubmit." am: 3d8681e31d am: 9dc9fd8930 am: 5860c207c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2176682

Change-Id: I7f48882ac9978964da17b93579e385557866a1ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-29 22:09:58 +00:00
Treehugger Robot
5860c207c9 Merge "Exclude large tests from presubmit." am: 3d8681e31d am: 9dc9fd8930
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2176682

Change-Id: Ia285f9d7b8e2ac0a4b7116af9b759bed56074aa7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-29 21:43:14 +00:00
Treehugger Robot
3d8681e31d Merge "Exclude large tests from presubmit." 2022-08-29 20:52:36 +00:00
Nate Myren
e0f3d12d32 Revert "DO NOT MERGE Add GET_USAGE_STATS to RUNTIME_AND_APPOP_PERMISSIONS_OPS" am: 768e9f12d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19735199

Change-Id: Ice331481669003abfa7df7ef713170da35f40f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 17:16:42 +00:00
Nate Myren
04f6c9fa6a Merge "Revert "DO NOT MERGE Add GET_USAGE_STATS to RUNTIME_AND_APPOP_PERMISSIONS_OPS"" into tm-qpr-dev 2022-08-26 17:01:32 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
2022-08-25 10:57:12 -07:00
wilsonshih
848db58379 [RESTRICT AUTOMERGE]BackGestureAnimation: a lightweight recents am: c9c9a757a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19394174

Change-Id: I855a2c63713e9543f18b6e84e071b21589dd3729
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 15:07:21 +00:00
Wei Sheng Shih
4ec0b52029 Merge "[RESTRICT AUTOMERGE]BackGestureAnimation: a lightweight recents animation controller" into tm-qpr-dev 2022-08-25 14:04:21 +00:00
Thiébaud Weksteen
5d28354057 Merge "Remove lowpan internal API" am: 649a208492 am: 4ad24dd314 am: e9a59c6013 am: 52101fa97d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192895

Change-Id: I83a483bf766325978ac70b52414f153ee7a5246f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 04:06:20 +00:00
Thiébaud Weksteen
52101fa97d Merge "Remove lowpan internal API" am: 649a208492 am: 4ad24dd314 am: e9a59c6013
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192895

Change-Id: I2f67c1b86855bc1accc236cbeee8e84b2bfe3d2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 03:40:29 +00:00
Thiébaud Weksteen
e9a59c6013 Merge "Remove lowpan internal API" am: 649a208492 am: 4ad24dd314
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2192895

Change-Id: I8d4192ac1cf5bd97a295d62f8d46dae795c3e096
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 02:19:57 +00:00
Nate Myren
768e9f12d6 Revert "DO NOT MERGE Add GET_USAGE_STATS to RUNTIME_AND_APPOP_PERMISSIONS_OPS"
This reverts commit 76718dd9f4.

Reason for revert: b/243646481

Change-Id: I6b200a3269e2a4fd1943c20e3074f19afe46f6dd
2022-08-24 20:49:02 +00:00
George Mount
70ce9e0487 Only use return transition when requested.
Fixes: 233975804

When exiting back, the activity transition should not
run unless an activity transition has been requested.

Test: existing ActivityTransitionTests, manually use Settings
Change-Id: Ice2cf6d82c25c65076a9656ddd847a9e2aa68b80
2022-08-24 10:24:06 -07:00
Michael Wright
86af40a0e4 Merge "Revert^3 "Fix binder error when an app has many channels"" into tm-qpr-dev am: 0b75242b7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19713796

Change-Id: I09d1af14599bb9ddbd22fedea88322a054fe5712
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 16:05:15 +00:00
Michael Wright
0b75242b7b Merge "Revert^3 "Fix binder error when an app has many channels"" into tm-qpr-dev 2022-08-24 15:24:09 +00:00
Michael Wright
6e662a45b5 Revert^3 "Fix binder error when an app has many channels"
f6d322577a

Change-Id: Ib42bf11c154e287119a5af0a4f92510cfb3a6cc7
2022-08-24 12:22:12 +00:00
wilsonshih
c9c9a757a8 [RESTRICT AUTOMERGE]BackGestureAnimation: a lightweight recents
animation controller

Copy most of code from RecentsAnimationController to back gesture
animation controller(BackNaviAnimationController), the infrastructure
can be reused for either back-to-home/back-to-task/back-to-activity
animations if needed. Since the infrasturcture of legacy recents
animation controller should be stable already, we don't need to
worry about issues like leak leashes/flickers/fixed rotation.

BackAnimationAdaptor is a temporary class to help migrate to shell
transition, the target is to replace it by RemoteTransition.

Next step: Migrate to shell transition, decouple animation info from
BackNavigationInfo.
Test: manually play back to home animation to verify no flicker/black
background/leak surface. Also test that there can play back to home
animation even when quick swipe.
Test: atest BackNavigationTest
Test: atest BackNavigationControllerTests BackAnimationControllerTest
Bug: 237642535

Change-Id: I436a3dcf5011c56c08d131b40168f19128cc8723
2022-08-24 02:35:46 +00:00