diff options
| author | 2023-01-13 16:29:16 +0000 | |
|---|---|---|
| committer | 2023-01-13 16:29:16 +0000 | |
| commit | bab869ca8ccccc13dfa993ce71f9e6ec11779277 (patch) | |
| tree | 83c816766f4e5ba9e353684586d9f10c95614bcb | |
| parent | bc907f456fd8d8e6d63958a757f8c47146b40902 (diff) | |
| parent | 99131186622c23ffb06d5a725958f6624fe1fdcb (diff) | |
Merge "Fix notification permission for letterboxed activity" into tm-qpr-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/LetterboxUiController.java | 5 | ||||
| -rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java | 21 |
2 files changed, 2 insertions, 24 deletions
diff --git a/services/core/java/com/android/server/wm/LetterboxUiController.java b/services/core/java/com/android/server/wm/LetterboxUiController.java index 75ba2146267d..9c43c1d62ab8 100644 --- a/services/core/java/com/android/server/wm/LetterboxUiController.java +++ b/services/core/java/com/android/server/wm/LetterboxUiController.java @@ -1146,10 +1146,9 @@ final class LetterboxUiController { final ActivityRecord firstOpaqueActivityBeneath = mActivityRecord.getTask().getActivity( ActivityRecord::fillsParent, mActivityRecord, false /* includeBoundary */, true /* traverseTopToBottom */); - if (firstOpaqueActivityBeneath == null - || mActivityRecord.launchedFromUid != firstOpaqueActivityBeneath.getUid()) { + if (firstOpaqueActivityBeneath == null) { // We skip letterboxing if the translucent activity doesn't have any opaque - // activities beneath of if it's launched from a different user (e.g. notification) + // activities beneath return; } inheritConfiguration(firstOpaqueActivityBeneath); diff --git a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java index a8e91980014e..995932c46201 100644 --- a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java @@ -197,27 +197,6 @@ public class SizeCompatTests extends WindowTestsBase { } @Test - public void testNotApplyStrategyToTranslucentActivitiesWithDifferentUid() { - mWm.mLetterboxConfiguration.setTranslucentLetterboxingOverrideEnabled(true); - setUpDisplaySizeWithApp(2000, 1000); - prepareUnresizable(mActivity, 1.5f /* maxAspect */, SCREEN_ORIENTATION_PORTRAIT); - mActivity.info.setMinAspectRatio(1.2f); - mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */); - // Translucent Activity - final ActivityRecord translucentActivity = new ActivityBuilder(mAtm) - .setScreenOrientation(SCREEN_ORIENTATION_LANDSCAPE) - .setMinAspectRatio(1.1f) - .setMaxAspectRatio(3f) - .build(); - doReturn(false).when(translucentActivity).fillsParent(); - mTask.addChild(translucentActivity); - // We check bounds - final Rect opaqueBounds = mActivity.getConfiguration().windowConfiguration.getBounds(); - final Rect translucentRequestedBounds = translucentActivity.getRequestedOverrideBounds(); - assertNotEquals(opaqueBounds, translucentRequestedBounds); - } - - @Test public void testApplyStrategyToMultipleTranslucentActivities() { mWm.mLetterboxConfiguration.setTranslucentLetterboxingOverrideEnabled(true); setUpDisplaySizeWithApp(2000, 1000); |