Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cad4ab47 authored by Josh Yang's avatar Josh Yang
Browse files

Show wallpaper when swiping back only if the back task has the wallpaper

flag.

Bug: 337728911
Test: atest WmTests:BackNavigationControllerTests
Test: manual test swipe back to home and confirm wallpaper behaves
      correctly
Change-Id: I3311bbb92517af9476994bc4e6abeffaa3eea9a9
parent ef4e537d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -302,7 +302,9 @@ class BackNavigationController {
                } else if (prevTask.isActivityTypeHome()) {
                    removedWindowContainer = currentTask;
                    backType = BackNavigationInfo.TYPE_RETURN_TO_HOME;
                    mShowWallpaper = true;
                    final ActivityRecord ar = prevTask.getTopNonFinishingActivity();
                    mShowWallpaper =
                            ar != null && ar.forAllWindows(WindowState::hasWallpaper, true);
                } else {
                    // If it reaches the top activity, we will check the below task from parent.
                    // If it's null or multi-window and has different parent task, fallback the type