diff options
author | Hani Kazmi <hanikazmi@google.com> | 2023-05-22 15:19:10 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-14 00:37:31 +0000 |
commit | c8b220a6287829d0e67afd7f79c4d436600591e1 (patch) | |
tree | b9b84da6f9d713239678aa60806b7340a4786514 | |
parent | de0b6c36d30d7fa7196b0f8a28d855c270a8fd63 (diff) | |
download | base-c8b220a6287829d0e67afd7f79c4d436600591e1.tar.gz |
Update Pip launches to not enter pinned task if in background.
Addresses a BAL bypass where Pip could be started without the launcher
being visible.
Bug: 271576718
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests
Test: atest android.server.wm.BackgroundActivityLaunchTest#testPipCannotStartFromBackground
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b263d3beed7a412ac342c63956f213b70d6e2679)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:291d124257f6e46862a813305892b02b9a8f851c)
Merged-In: Icfe0a17d7f6f127acaae8400a97e8bdc53fcc9ad
Change-Id: Icfe0a17d7f6f127acaae8400a97e8bdc53fcc9ad
-rw-r--r-- | services/core/java/com/android/server/wm/ActivityStarter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index d1a5ead78af2..4d5238a961f4 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -1709,7 +1709,8 @@ class ActivityStarter { // If Activity's launching into PiP, move the mStartActivity immediately to pinned mode. // Note that mStartActivity and source should be in the same Task at this point. if (mOptions != null && mOptions.isLaunchIntoPip() - && sourceRecord != null && sourceRecord.getTask() == mStartActivity.getTask()) { + && sourceRecord != null && sourceRecord.getTask() == mStartActivity.getTask() + && balCode != BAL_BLOCK) { mRootWindowContainer.moveActivityToPinnedRootTask(mStartActivity, sourceRecord, "launch-into-pip"); } |