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

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

services: fix quickswitch with gesture pill disabled

Change-Id: Ia2a543eec28c65897a5f3f0b89ebc6b6028a29a1
parent e0c6b4ab
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -227,9 +227,13 @@ class RecentTasks {
                    final boolean isAppWindowTouch = FIRST_APPLICATION_WINDOW <= win.mAttrs.type
                    final boolean isAppWindowTouch = FIRST_APPLICATION_WINDOW <= win.mAttrs.type
                            && win.mAttrs.type <= LAST_APPLICATION_WINDOW;
                            && win.mAttrs.type <= LAST_APPLICATION_WINDOW;
                    if (isAppWindowTouch) {
                    if (isAppWindowTouch) {
                        final Task stack = mService.getTopDisplayFocusedRootTask();
                        // If we quickswitch while having gesture pill disabled, navbar height
                        final Task topTask = stack != null ? stack.getTopMostTask() : null;
                        // is 0dp, which means the quickswitch start touch is inside app window
                        resetFreezeTaskListReordering(topTask);
                        // 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());
            }, null).recycleOnUse());