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

Unverified Commit 303756af authored by nift4's avatar nift4 Committed by Michael Bestas
Browse files

services: fix quickswitch with gesture pill disabled

Change-Id: Ia2a543eec28c65897a5f3f0b89ebc6b6028a29a1
parent 75766742
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -253,12 +253,13 @@ class RecentTasks {
                    final boolean isAppWindowTouch = FIRST_APPLICATION_WINDOW <= win.mAttrs.type
                            && win.mAttrs.type <= LAST_APPLICATION_WINDOW;
                    if (isAppWindowTouch) {
                        final Task stack = mService.getTopDisplayFocusedRootTask();
                        final Task topTask = stack != null ? stack.getTopMostTask() : null;
                        ProtoLog.i(WM_DEBUG_TASKS, "Resetting frozen recents task list"
                                + " reason=app touch win=%s x=%d y=%d insetFrame=%s", win, x, y,
                                mTmpRect);
                        resetFreezeTaskListReordering(topTask);
                        // If we quickswitch while having gesture pill disabled, navbar height
                        // is 0dp, which means the quickswitch start touch is inside app window
                        // as well. To solve this, we defer resetting the freeze 500ms into the
                        // future and if Launcher3 sends a freeze notice again, this app touch
                        // effectively gets ignored when removeCallbacks() removes this runnable.
                        mService.mH.removeCallbacks(mResetFreezeTaskListOnTimeoutRunnable);
                        mService.mH.postDelayed(mResetFreezeTaskListOnTimeoutRunnable, 500);
                    }
                }
            }, null).recycleOnUse());