summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2022-11-10 13:05:28 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-11-10 13:05:28 +0000
commit3a15cfb3c3599d1d678cdc89fad374b783fd2b9c (patch)
tree02cbd82d7be2da669bf5497f6f8b09cd578aa8df /libs
parent651b57a569f19fd53ebdd81048f3fcbe869c7945 (diff)
parentf1ecd469059495e839b20c7179377549ac1dabe6 (diff)
Merge "Fix potential crash when exit splash screen" am: 18b88655a4 am: f1ecd46905
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292500 Change-Id: I9f2c092b874bd071be7e7811a3f06090f6758208 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
index a0e176c7ea68..ff6f2b03c02c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
@@ -430,7 +430,8 @@ public class StartingSurfaceDrawer {
}
@Override
- public @Nullable SplashScreenView get() {
+ @Nullable
+ public SplashScreenView get() {
synchronized (this) {
while (!mIsViewSet) {
try {
@@ -691,7 +692,7 @@ public class StartingSurfaceDrawer {
private final TaskSnapshotWindow mTaskSnapshotWindow;
private SplashScreenView mContentView;
private boolean mSetSplashScreen;
- private @StartingWindowType int mSuggestType;
+ @StartingWindowType private int mSuggestType;
private int mBGColor;
private final long mCreateTime;
private int mSystemBarAppearance;
@@ -732,7 +733,7 @@ public class StartingSurfaceDrawer {
// Reset the system bar color which set by splash screen, make it align to the app.
private void clearSystemBarColor() {
- if (mDecorView == null) {
+ if (mDecorView == null || !mDecorView.isAttachedToWindow()) {
return;
}
if (mDecorView.getLayoutParams() instanceof WindowManager.LayoutParams) {