summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/RecentsAnimationController.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 5da668c8c361..16c722653960 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -850,7 +850,7 @@ public class RecentsAnimationController implements DeathRecipient {
return w != null && w.mAttrs.type == TYPE_BASE_APPLICATION &&
((w.mActivityRecord != null && mTargetActivityRecord == w.mActivityRecord)
|| isAnimatingTask(w.getTask()))
- && isTargetOverWallpaper();
+ && isTargetOverWallpaper() && w.isOnScreen();
}
/**
diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index 5c39bd0a316b..6dd23ba02e9a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -423,6 +423,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase {
final WindowState homeWindow = createWindow(null, TYPE_BASE_APPLICATION, homeActivity,
"homeWindow");
+ makeWindowVisible(homeWindow);
homeActivity.addWindow(homeWindow);
homeWindow.getAttrs().flags |= FLAG_SHOW_WALLPAPER;