commit | 3047485ec73a2f1ea7aac3c85461ed54e13ac811 | [log] [tgz] |
---|---|---|
author | Wei Sheng Shih <wilsonshih@google.com> | Tue Jun 13 04:23:23 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jun 13 04:23:23 2023 +0000 |
tree | 98154527670f79dd648db591007137d96aafcd67 | |
parent | e2777d9a419f33435df6473075b92dae0217b3e1 [diff] | |
parent | b9df9a61b928d50fd441ff23fab53c0bf7c655ff [diff] |
Merge "Preventing from double remove starting window after Activity destoryed" into udc-dev am: b9df9a61b9 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23657536 Change-Id: Ia49a5bbf8c8cb13c13143996ecd0e21c40e83eef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java index ae72220..4cfbbd9 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
@@ -20,6 +20,7 @@ import static android.view.Choreographer.CALLBACK_INSETS_ANIMATION; import static android.window.StartingWindowInfo.STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN; +import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityTaskManager; @@ -370,8 +371,11 @@ mStartingWindowRecordManager.addRecord(taskId, tView); } - private void removeWindowInner(View decorView, boolean hideView) { + private void removeWindowInner(@NonNull View decorView, boolean hideView) { requestTopUi(false); + if (!decorView.isAttachedToWindow()) { + return; + } if (hideView) { decorView.setVisibility(View.GONE); }