diff options
| author | 2021-04-09 01:09:34 +0000 | |
|---|---|---|
| committer | 2021-04-09 01:09:34 +0000 | |
| commit | a8b73e2075292e2a0a1f1151aeb87292081c5cb7 (patch) | |
| tree | 1410ab2935f71a81a80db5aeaac1699825cfbfea | |
| parent | db4ff9ef89da6804bc860812f5b79a84e904ccc2 (diff) | |
| parent | c5db55023bf8b0ce3773e477635818ca86a9ac15 (diff) | |
Merge "Ignore windowDisablePreview when launching from system surface." into sc-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityRecord.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 01a46b311740..376595b95c9d 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -1887,6 +1887,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return selectedTheme; } + // Whether this activity launched from system or Home or SystemUI + private boolean launchedFromSystemSurface() { + return launchedFromUid == Process.SYSTEM_UID || launchedFromUid == Process.ROOT_UID + || launchedFromHomeProcess + || mAtmService.getSysUiServiceComponentLocked().getPackageName().equals( + launchedFromPackage); + } + private boolean validateStartingWindowTheme(String pkg, int theme) { // If this is a translucent window, then don't show a starting window -- the current // effect (a full-screen opaque starting window that fades away to the real contents @@ -1913,7 +1921,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A "Translucent=%s Floating=%s ShowWallpaper=%s Disable=%s", windowIsTranslucent, windowIsFloating, windowShowWallpaper, windowDisableStarting); - if (windowIsTranslucent || windowIsFloating || windowDisableStarting) { + // If this activity is launched from system surface, ignore windowDisableStarting + if (windowIsTranslucent || windowIsFloating + || (windowDisableStarting && !launchedFromSystemSurface())) { return false; } if (windowShowWallpaper |