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

Commit 43ecc1d0 authored by Saumya Prakash's avatar Saumya Prakash Committed by Android (Google) Code Review
Browse files

Merge "Fix Taskbar not auto stashing from multi instance menu" into main

parents 759798d7 0028bed6
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -130,6 +130,22 @@ class ManageWindowsTaskbarShortcut<T>(
                onOutsideClickListener,
                controllers,
            )

        // If the view is removed from elsewhere, reset the state to allow the taskbar to auto-stash
        taskbarShortcutAllWindowsView.menuView.rootView.addOnAttachStateChangeListener(
            object : View.OnAttachStateChangeListener {
                override fun onViewAttachedToWindow(v: View) {
                    return
                }

                override fun onViewDetachedFromWindow(v: View) {
                    controllers.taskbarAutohideSuspendController.updateFlag(
                        FLAG_AUTOHIDE_SUSPEND_MULTI_INSTANCE_MENU_OPEN,
                        false,
                    )
                }
            }
        )
    }

    /**
@@ -214,7 +230,6 @@ class ManageWindowsTaskbarShortcut<T>(
                FLAG_AUTOHIDE_SUSPEND_MULTI_INSTANCE_MENU_OPEN,
                false,
            )
            controllers.taskbarStashController.updateAndAnimateTransientTaskbar(true)
            taskbarOverlayContext.dragLayer?.removeView(menuView.rootView)
            taskbarOverlayContext.dragLayer.removeTouchController(this)
        }