Loading services/core/java/com/android/server/wm/BackNavigationController.java +4 −2 Original line number Diff line number Diff line Loading @@ -312,7 +312,9 @@ class BackNavigationController { // another task. final Task prevParent = prevTask.getParent().asTask(); final Task currParent = currentTask.getParent().asTask(); if (prevTask.inMultiWindowMode() && prevParent != currParent) { if ((prevTask.inMultiWindowMode() && prevParent != currParent) // Do not animate to translucent task, it could be trampoline. || hasTranslucentActivity(currentActivity, prevActivities)) { backType = BackNavigationInfo.TYPE_CALLBACK; } else { removedWindowContainer = prevTask; Loading Loading @@ -527,7 +529,7 @@ class BackNavigationController { } for (int i = prevActivities.size() - 1; i >= 0; --i) { final ActivityRecord test = prevActivities.get(i); if (!test.occludesParent() || test.showWallpaper()) { if (!test.occludesParent() || test.hasWallpaper()) { return true; } } Loading services/core/java/com/android/server/wm/WindowContainer.java +12 −0 Original line number Diff line number Diff line Loading @@ -3889,6 +3889,18 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return false; } /** @return {@code true} if this container wants to show wallpaper. */ boolean hasWallpaper() { for (int i = mChildren.size() - 1; i >= 0; --i) { final WindowContainer child = mChildren.get(i); if (child.hasWallpaper()) { return true; } } return false; } @Nullable static WindowContainer fromBinder(IBinder binder) { return RemoteToken.fromBinder(binder).getContainer(); Loading services/core/java/com/android/server/wm/WindowState.java +1 −0 Original line number Diff line number Diff line Loading @@ -5857,6 +5857,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return hasWallpaper(); } @Override boolean hasWallpaper() { return (mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0 || hasWallpaperForLetterboxBackground(); } Loading services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java +10 −0 Original line number Diff line number Diff line Loading @@ -167,8 +167,18 @@ public class BackNavigationControllerTests extends WindowTestsBase { assertThat(typeToString(backNavigationInfo.getType())) .isEqualTo(typeToString(BackNavigationInfo.TYPE_CALLBACK)); // reset drawing status to test if previous task is translucent activity backNavigationInfo.onBackNavigationFinished(false); mBackNavigationController.clearBackAnimations(); // simulate translucent recordA.setOccludesParent(false); backNavigationInfo = startBackNavigation(); assertThat(typeToString(backNavigationInfo.getType())) .isEqualTo(typeToString(BackNavigationInfo.TYPE_CALLBACK)); // reset drawing status to test keyguard occludes topActivity.setOccludesParent(true); recordA.setOccludesParent(true); backNavigationInfo.onBackNavigationFinished(false); mBackNavigationController.clearBackAnimations(); makeWindowVisibleAndDrawn(topActivity.findMainWindow()); Loading Loading
services/core/java/com/android/server/wm/BackNavigationController.java +4 −2 Original line number Diff line number Diff line Loading @@ -312,7 +312,9 @@ class BackNavigationController { // another task. final Task prevParent = prevTask.getParent().asTask(); final Task currParent = currentTask.getParent().asTask(); if (prevTask.inMultiWindowMode() && prevParent != currParent) { if ((prevTask.inMultiWindowMode() && prevParent != currParent) // Do not animate to translucent task, it could be trampoline. || hasTranslucentActivity(currentActivity, prevActivities)) { backType = BackNavigationInfo.TYPE_CALLBACK; } else { removedWindowContainer = prevTask; Loading Loading @@ -527,7 +529,7 @@ class BackNavigationController { } for (int i = prevActivities.size() - 1; i >= 0; --i) { final ActivityRecord test = prevActivities.get(i); if (!test.occludesParent() || test.showWallpaper()) { if (!test.occludesParent() || test.hasWallpaper()) { return true; } } Loading
services/core/java/com/android/server/wm/WindowContainer.java +12 −0 Original line number Diff line number Diff line Loading @@ -3889,6 +3889,18 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return false; } /** @return {@code true} if this container wants to show wallpaper. */ boolean hasWallpaper() { for (int i = mChildren.size() - 1; i >= 0; --i) { final WindowContainer child = mChildren.get(i); if (child.hasWallpaper()) { return true; } } return false; } @Nullable static WindowContainer fromBinder(IBinder binder) { return RemoteToken.fromBinder(binder).getContainer(); Loading
services/core/java/com/android/server/wm/WindowState.java +1 −0 Original line number Diff line number Diff line Loading @@ -5857,6 +5857,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return hasWallpaper(); } @Override boolean hasWallpaper() { return (mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0 || hasWallpaperForLetterboxBackground(); } Loading
services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java +10 −0 Original line number Diff line number Diff line Loading @@ -167,8 +167,18 @@ public class BackNavigationControllerTests extends WindowTestsBase { assertThat(typeToString(backNavigationInfo.getType())) .isEqualTo(typeToString(BackNavigationInfo.TYPE_CALLBACK)); // reset drawing status to test if previous task is translucent activity backNavigationInfo.onBackNavigationFinished(false); mBackNavigationController.clearBackAnimations(); // simulate translucent recordA.setOccludesParent(false); backNavigationInfo = startBackNavigation(); assertThat(typeToString(backNavigationInfo.getType())) .isEqualTo(typeToString(BackNavigationInfo.TYPE_CALLBACK)); // reset drawing status to test keyguard occludes topActivity.setOccludesParent(true); recordA.setOccludesParent(true); backNavigationInfo.onBackNavigationFinished(false); mBackNavigationController.clearBackAnimations(); makeWindowVisibleAndDrawn(topActivity.findMainWindow()); Loading