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
DreamManager#startDream has been updated on QPR and master which removes
the unnecessary component name parameter, but it breaks TM CTS tests.
The interim api added in this change will prevent breakage on TM, and
should not be merged downstream.
Test: atest DreamManagerServiceTests
Fix: 245223722
Fix: 245058392
Fix: 245070240
Change-Id: Id9e8cc67003da9fc3e03bffd6ec50643d10652b5
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
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
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
Test: unit test and cts test
Ignore-AOSP-First: confidential feature
BUG: 242480433
Change-Id: I0fd2950eea267d56fbd8e89ecc52fdd590992e75
Merged-In: I0fd2950eea267d56fbd8e89ecc52fdd590992e75
(cherry picked from commit 44eafb8f58)
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
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
We use to set Activity#mIsInPictureInPictureMode to be true when app
requests Activity#enterPictureInPictureMode and therefore when they
receive the onPause callback, Activity#isInPictureInPictureMode can be
true. With the new auto-enter-pip API, this code path is no more
relevant and here we add extra info to PauseActivityItem to set the same
flag when WM puts the Activity into PiP mode due to auto-enter.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/yXi24xi6TgYGhoqB31Oov
Bug: 239618513
Test: follow the reproduce steps in bug, see video
Test: atest PinnedStackTests
Change-Id: I81ece7d3aad8eb868d95f106f6825612e0741a19
34b3e4b51c
Test: NotificationChannelGroupTest
Test: NotificationManagerServiceTest
Test: PreferencesHelperTest (new test for revert:
testGetNotificationChannelGroup)
Test: long press on a conversation notification in the shade
Bug: 215072888
Change-Id: Ib9c671b0fd1f97e01ef02957839ebad2cadb5e44
Bug: 236932163
This change adds a work-around to PropertyInvalidatedCache for
failures to set a system property. Such failures cause fatal crashes
in Android but it is believed that a simple retry will succeed.
(Note: the failures have only been reported on partner devices and
cannot be reproduced on Pixel phones, so no root-cause is available
yet.)
RuntimeExceptions (thrown from android_os_SystemProperties.cpp) are
caught and retried. The retry limit is 5 times with a 200ms delay
between attempts. This means that the maximum delay is 1s, whcih
should avoid triggering an ANR.
In addition to automated testing, a manual test was created with
ambush code in the system property component of libc. The ambush code
injected an error into the set-property logic for cache keys. It was
observed that the system recovered properly.
Test: atest:
* FrameworksCoreTests:PropertyInvalidatedCacheTests
* FrameworksCoreTests:IpcDataCacheTest
Change-Id: I3a124b185c7499a45b27df7cbf889ae6d1d33377
(cherry picked from commit 9b0f81025c)
This reverts commit ade911b9c7.
Reason for revert: The feature is planned to run a study in QPR1
with the aim of launching in QPR-2. The code will be removed from
build time before QPR1 finalized.
Change-Id: Ida04260a1196121bb4084b527216aae1e4e6ec54
The implementation of shared-element transitions takes the
ActivityOptions from the calling activity and sends them to
another activity. This means that any sensitive information
passed into ActivityManager via ActivityOptions can make its
way to an unrelated app. Recently a RemoteTransition object
was added which includes some sensitive information.
This CL strips the sensitive information from the activity
options before sending it to anonther app.
Bug: 237290578
Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions
Change-Id: Ifa08fc195698f02bf70ca386178c67f6ba4a14ea
The implementation of shared-element transitions takes the
ActivityOptions from the calling activity and sends them to
another activity. This means that any sensitive information
passed into ActivityManager via ActivityOptions can make its
way to an unrelated app. Recently a RemoteTransition object
was added which includes some sensitive information.
This CL strips the sensitive information from the activity
options after it is extracted so that it can't be sent
to the target.
Bug: 237290578
Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions
Change-Id: Ic9f8062e67ab895292af75e97a9ce2f4aa45d467
- Auto uses the multi display and its Home uses TaskView, so it's not enough to peek the top Tasks to get the visibility of Home.
- Set the default number of tasks to retrieve as 10 to scan all visible tasks.
- Don't query PM to check if the task is Home, check the ActivityType instead.
Bug: 236099098
Test: atest android.app.cts.ActivityManagerTest#testHomeVisibilityListener
Change-Id: I10b6d84292d3180f095dd9f8cf76b4c9db641091