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

Commit 94dcb3b5 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Not freezing All Apps during user interactions" into ub-launcher3-qt-qpr1-dev

parents 41878777 2b3303c7
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -628,20 +628,4 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo

        return super.performAccessibilityAction(action, arguments);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        final boolean result = super.dispatchTouchEvent(ev);
        switch (ev.getActionMasked()) {
            case MotionEvent.ACTION_DOWN:
                if (result) mAllAppsStore.enableDeferUpdates(
                        AllAppsStore.DEFER_UPDATES_USER_INTERACTION);
                break;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL:
                mAllAppsStore.disableDeferUpdates(AllAppsStore.DEFER_UPDATES_USER_INTERACTION);
                break;
        }
        return result;
    }
}
+1 −3
Original line number Diff line number Diff line
@@ -39,10 +39,8 @@ public class AllAppsStore {

    // Defer updates flag used to defer all apps updates to the next draw.
    public static final int DEFER_UPDATES_NEXT_DRAW = 1 << 0;
    // Defer updates flag used to defer all apps updates while the user interacts with all apps.
    public static final int DEFER_UPDATES_USER_INTERACTION = 1 << 1;
    // Defer updates flag used to defer all apps updates by a test's request.
    public static final int DEFER_UPDATES_TEST = 1 << 2;
    public static final int DEFER_UPDATES_TEST = 1 << 1;

    private PackageUserKey mTempKey = new PackageUserKey(null, null);
    private final HashMap<ComponentKey, AppInfo> mComponentToAppMap = new HashMap<>();