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

Unverified Commit 1ee408ae authored by nift4's avatar nift4 Committed by Michael Bestas
Browse files

services: fix quickswitch with gesture pill disabled

Change-Id: Ia2a543eec28c65897a5f3f0b89ebc6b6028a29a1
parent 7d291864
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -232,9 +232,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;
                        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());