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

Commit f174ca93 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Fix wallpaper input consumer handling in InputMonitor

Only add the wallpaper input consumer if the wallpaper is visible.
Otherwise it breaks Setup Wizard.
If there is no wallpaper at all, still add the consumer at the end.

Bug: 28026545
Change-Id: I833f59ef51f1b151fc110f204aa666398fa764f9
(cherry picked from commit e0c1761c7695929d442d051345d3d3152cd3b103)
parent db976a28
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -306,8 +306,9 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
                }

                if (addWallpaperInputConsumerHandle) {
                    if (child.mAttrs.type == WindowManager.LayoutParams.TYPE_WALLPAPER) {
                        // Add the wallpaper input consumer above the first wallpaper window.
                    if (child.mAttrs.type == WindowManager.LayoutParams.TYPE_WALLPAPER &&
                            child.isVisibleLw()) {
                        // Add the wallpaper input consumer above the first visible wallpaper.
                        addInputWindowHandleLw(mService.mWallpaperInputConsumer.mWindowHandle);
                        addWallpaperInputConsumerHandle = false;
                    }
@@ -341,7 +342,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
        }

        if (addWallpaperInputConsumerHandle) {
            // No wallpaper found, add the wallpaper input consumer at the end.
            // No visible wallpaper found, add the wallpaper input consumer at the end.
            addInputWindowHandleLw(mService.mWallpaperInputConsumer.mWindowHandle);
        }