diff options
4 files changed, 24 insertions, 12 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 89a4a13c9bd9..404a369764eb 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -2425,7 +2425,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final int type = getStartingWindowType(newTask, taskSwitch, processRunning, allowTaskSnapshot, activityCreated, activityAllDrawn, snapshot); - //TODO(191787740) Remove for T+ + //TODO(191787740) Remove for V+ final boolean useLegacy = type == STARTING_WINDOW_TYPE_SPLASH_SCREEN && mWmService.mStartingSurfaceController.isExceptionApp(packageName, mTargetSdk, () -> { diff --git a/services/core/java/com/android/server/wm/SplashScreenExceptionList.java b/services/core/java/com/android/server/wm/SplashScreenExceptionList.java index b3cd3f0df97e..3fb897b5c0e9 100644 --- a/services/core/java/com/android/server/wm/SplashScreenExceptionList.java +++ b/services/core/java/com/android/server/wm/SplashScreenExceptionList.java @@ -70,7 +70,7 @@ class SplashScreenExceptionList { } /** - * Returns true if the packageName is in the list and the target sdk is before or including T. + * Returns true if the packageName is in the list and the target sdk is before or including V. * * @param packageName The package name of the application to check * @param targetSdk The target sdk of the application @@ -82,7 +82,7 @@ class SplashScreenExceptionList { @SuppressWarnings("AndroidFrameworkCompatChange") // Target sdk check public boolean isException(@NonNull String packageName, int targetSdk, @Nullable Supplier<ApplicationInfo> infoSupplier) { - if (targetSdk > Build.VERSION_CODES.TIRAMISU) { + if (targetSdk > Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1) { return false; } diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index 41fcd6935567..3db53eb08ea1 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -2784,8 +2784,12 @@ public class ActivityRecordTests extends WindowTestsBase { testLegacySplashScreen(Build.VERSION_CODES.S, TYPE_PARAMETER_LEGACY_SPLASH_SCREEN); testLegacySplashScreen(Build.VERSION_CODES.TIRAMISU, TYPE_PARAMETER_LEGACY_SPLASH_SCREEN); - // Above T - testLegacySplashScreen(Build.VERSION_CODES.TIRAMISU + 1, 0); + testLegacySplashScreen(Build.VERSION_CODES.UPSIDE_DOWN_CAKE, + TYPE_PARAMETER_LEGACY_SPLASH_SCREEN); + testLegacySplashScreen(Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1, + TYPE_PARAMETER_LEGACY_SPLASH_SCREEN); + // Above V + testLegacySplashScreen(Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 2, 0); } finally { try { DeviceConfig.setProperties(properties); diff --git a/services/tests/wmtests/src/com/android/server/wm/SplashScreenExceptionListTest.java b/services/tests/wmtests/src/com/android/server/wm/SplashScreenExceptionListTest.java index 8425844d8042..8bd54731c7c2 100644 --- a/services/tests/wmtests/src/com/android/server/wm/SplashScreenExceptionListTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/SplashScreenExceptionListTest.java @@ -90,19 +90,23 @@ public class SplashScreenExceptionListTest { public void packageFromDeviceConfigIgnored() { setExceptionListAndWaitForCallback("com.test.nosplashscreen1,com.test.nosplashscreen2"); - // In list, up to T included + // In list, up to V included assertIsException("com.test.nosplashscreen1", VERSION_CODES.R); assertIsException("com.test.nosplashscreen1", VERSION_CODES.S); assertIsException("com.test.nosplashscreen1", VERSION_CODES.TIRAMISU); + assertIsException("com.test.nosplashscreen1", VERSION_CODES.UPSIDE_DOWN_CAKE); + assertIsException("com.test.nosplashscreen1", VERSION_CODES.UPSIDE_DOWN_CAKE + 1); - // In list, after T - assertIsNotException("com.test.nosplashscreen2", VERSION_CODES.TIRAMISU + 1); + // In list, after V + assertIsNotException("com.test.nosplashscreen2", VERSION_CODES.UPSIDE_DOWN_CAKE + 2); assertIsNotException("com.test.nosplashscreen2", VERSION_CODES.CUR_DEVELOPMENT); - // Not in list, up to T included + // Not in list, up to V included assertIsNotException("com.test.splashscreen", VERSION_CODES.S); assertIsNotException("com.test.splashscreen", VERSION_CODES.R); assertIsNotException("com.test.splashscreen", VERSION_CODES.TIRAMISU); + assertIsNotException("com.test.splashscreen", VERSION_CODES.UPSIDE_DOWN_CAKE); + assertIsNotException("com.test.splashscreen", VERSION_CODES.UPSIDE_DOWN_CAKE + 1); } @Test @@ -119,15 +123,19 @@ public class SplashScreenExceptionListTest { assertIsNotException(packageName, VERSION_CODES.R, activityInfo); assertIsNotException(packageName, VERSION_CODES.S, activityInfo); assertIsNotException(packageName, VERSION_CODES.TIRAMISU, activityInfo); + assertIsNotException(packageName, VERSION_CODES.UPSIDE_DOWN_CAKE, activityInfo); + assertIsNotException(packageName, VERSION_CODES.UPSIDE_DOWN_CAKE + 1, activityInfo); - // Exception up to T + // Exception up to V metaData.putBoolean("android.splashscreen.exception_opt_out", false); assertIsException(packageName, VERSION_CODES.R, activityInfo); assertIsException(packageName, VERSION_CODES.S, activityInfo); assertIsException(packageName, VERSION_CODES.TIRAMISU, activityInfo); + assertIsException(packageName, VERSION_CODES.UPSIDE_DOWN_CAKE, activityInfo); + assertIsException(packageName, VERSION_CODES.UPSIDE_DOWN_CAKE + 1, activityInfo); - // No Exception after T - assertIsNotException(packageName, VERSION_CODES.TIRAMISU + 1, activityInfo); + // No Exception after V + assertIsNotException(packageName, VERSION_CODES.UPSIDE_DOWN_CAKE + 2, activityInfo); assertIsNotException(packageName, VERSION_CODES.CUR_DEVELOPMENT, activityInfo); // Edge Cases |