Loading src/com/android/launcher3/Hotseat.java +0 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ public class Hotseat extends FrameLayout mLauncher.setAllAppsButton(allAppsButton); allAppsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener()); allAppsButton.setOnClickListener(mLauncher); allAppsButton.setOnLongClickListener(mLauncher); allAppsButton.setOnFocusChangeListener(mLauncher.mFocusHandler); } Loading src/com/android/launcher3/Launcher.java +9 −30 Original line number Diff line number Diff line Loading @@ -979,8 +979,7 @@ public class Launcher extends BaseActivity // Don't update the predicted apps if the user is returning to launcher in the apps // view after launching an app, as they may be depending on the UI to be static to // switch to another app, otherwise, if it was showAppsView(false /* animated */, !launchedFromApp /* updatePredictedApps */, mAppsView.shouldRestoreImeState() /* focusSearchBar */); showAppsView(false /* animated */, !launchedFromApp /* updatePredictedApps */); } else if (mOnResumeState == State.WIDGETS) { showWidgetsView(false, false); } Loading Loading @@ -2351,18 +2350,7 @@ public class Launcher extends BaseActivity if (!isAppsViewVisible()) { getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, ControlType.ALL_APPS_BUTTON); showAppsView(true /* animated */, true /* updatePredictedApps */, false /* focusSearchBar */); } } protected void onLongClickAllAppsButton(View v) { if (LOGD) Log.d(TAG, "onLongClickAllAppsButton"); if (!isAppsViewVisible()) { getUserEventDispatcher().logActionOnControl(Action.Touch.LONGPRESS, ControlType.ALL_APPS_BUTTON); showAppsView(true /* animated */, true /* updatePredictedApps */, true /* focusSearchBar */); showAppsView(true /* animated */, true /* updatePredictedApps */); } } Loading Loading @@ -2750,13 +2738,6 @@ public class Launcher extends BaseActivity if (isWorkspaceLocked()) return false; if (mState != State.WORKSPACE) return false; if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator) || (v == mAllAppsButton && mAllAppsButton != null)) { onLongClickAllAppsButton(v); return true; } boolean ignoreLongPressToOverview = mDeviceProfile.shouldIgnoreLongPressToOverview(mLastDispatchTouchEventX); Loading Loading @@ -2956,13 +2937,12 @@ public class Launcher extends BaseActivity /** * Shows the apps view. */ public void showAppsView(boolean animated, boolean updatePredictedApps, boolean focusSearchBar) { public void showAppsView(boolean animated, boolean updatePredictedApps) { markAppsViewShown(); if (updatePredictedApps) { tryAndUpdatePredictedApps(); } showAppsOrWidgets(State.APPS, animated, focusSearchBar); showAppsOrWidgets(State.APPS, animated); } /** Loading @@ -2973,7 +2953,7 @@ public class Launcher extends BaseActivity if (resetPageToZero) { mWidgetsView.scrollToTop(); } showAppsOrWidgets(State.WIDGETS, animated, false); showAppsOrWidgets(State.WIDGETS, animated); mWidgetsView.post(new Runnable() { @Override Loading @@ -2990,7 +2970,7 @@ public class Launcher extends BaseActivity */ // TODO: calling method should use the return value so that when {@code false} is returned // the workspace transition doesn't fall into invalid state. private boolean showAppsOrWidgets(State toState, boolean animated, boolean focusSearchBar) { private boolean showAppsOrWidgets(State toState, boolean animated) { if (!(mState == State.WORKSPACE || mState == State.APPS_SPRING_LOADED || mState == State.WIDGETS_SPRING_LOADED || Loading @@ -3008,7 +2988,7 @@ public class Launcher extends BaseActivity } if (toState == State.APPS) { mStateTransitionAnimation.startAnimationToAllApps(animated, focusSearchBar); mStateTransitionAnimation.startAnimationToAllApps(animated); } else { mStateTransitionAnimation.startAnimationToWidgets(animated); } Loading Loading @@ -3081,8 +3061,7 @@ public class Launcher extends BaseActivity public void exitSpringLoadedDragMode() { if (mState == State.APPS_SPRING_LOADED) { showAppsView(true /* animated */, false /* updatePredictedApps */, false /* focusSearchBar */); showAppsView(true /* animated */, false /* updatePredictedApps */); } else if (mState == State.WIDGETS_SPRING_LOADED) { showWidgetsView(true, false); } else if (mState == State.WORKSPACE_SPRING_LOADED) { Loading Loading @@ -4095,7 +4074,7 @@ public class Launcher extends BaseActivity switch (keyCode) { case KeyEvent.KEYCODE_A: if (mState == State.WORKSPACE) { showAppsView(true, true, false); showAppsView(true, true); return true; } break; Loading src/com/android/launcher3/LauncherStateTransitionAnimation.java +1 −8 Original line number Diff line number Diff line Loading @@ -127,12 +127,8 @@ public class LauncherStateTransitionAnimation { /** * Starts an animation to the apps view. * * @param startSearchAfterTransition Immediately starts app search after the transition to * All Apps is completed. */ public void startAnimationToAllApps( final boolean animated, final boolean startSearchAfterTransition) { public void startAnimationToAllApps(final boolean animated) { final AllAppsContainerView toView = mLauncher.getAppsView(); final View buttonView = mLauncher.getStartViewForAllAppsRevealAnimation(); PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks(1f) { Loading @@ -156,9 +152,6 @@ public class LauncherStateTransitionAnimation { @Override void onTransitionComplete() { mLauncher.getUserEventDispatcher().resetElapsedContainerMillis(); if (startSearchAfterTransition) { toView.startAppsSearch(); } } }; int animType = CIRCULAR_REVEAL; Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +0 −11 Original line number Diff line number Diff line Loading @@ -195,13 +195,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc return false; } /** * Focuses the search field and begins an app search. */ public void startAppsSearch() { mSearchUiManager.startAppsSearch(); } /** * Resets the state of AllApps. */ Loading Loading @@ -372,10 +365,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc targetParent.containerType = mAppsRecyclerView.getContainerType(v); } public boolean shouldRestoreImeState() { return mSearchUiManager.shouldRestoreImeState(); } @Override public void setInsets(Rect insets) { DeviceProfile grid = mLauncher.getDeviceProfile(); Loading src/com/android/launcher3/allapps/AllAppsTransitionController.java +2 −6 Original line number Diff line number Diff line Loading @@ -227,9 +227,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul Action.Direction.UP, containerType); } mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */, false /* focusSearchBar */); mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */); if (hasSpringAnimationHandler()) { mSpringAnimationHandler.animateToFinalPosition(0); } Loading @@ -250,9 +248,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul Action.Direction.UP, containerType); } mLauncher.showAppsView(true, /* animated */ false /* updatePredictedApps */, false /* focusSearchBar */); mLauncher.showAppsView(true, /* animated */ false /* updatePredictedApps */); } } } Loading Loading
src/com/android/launcher3/Hotseat.java +0 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ public class Hotseat extends FrameLayout mLauncher.setAllAppsButton(allAppsButton); allAppsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener()); allAppsButton.setOnClickListener(mLauncher); allAppsButton.setOnLongClickListener(mLauncher); allAppsButton.setOnFocusChangeListener(mLauncher.mFocusHandler); } Loading
src/com/android/launcher3/Launcher.java +9 −30 Original line number Diff line number Diff line Loading @@ -979,8 +979,7 @@ public class Launcher extends BaseActivity // Don't update the predicted apps if the user is returning to launcher in the apps // view after launching an app, as they may be depending on the UI to be static to // switch to another app, otherwise, if it was showAppsView(false /* animated */, !launchedFromApp /* updatePredictedApps */, mAppsView.shouldRestoreImeState() /* focusSearchBar */); showAppsView(false /* animated */, !launchedFromApp /* updatePredictedApps */); } else if (mOnResumeState == State.WIDGETS) { showWidgetsView(false, false); } Loading Loading @@ -2351,18 +2350,7 @@ public class Launcher extends BaseActivity if (!isAppsViewVisible()) { getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, ControlType.ALL_APPS_BUTTON); showAppsView(true /* animated */, true /* updatePredictedApps */, false /* focusSearchBar */); } } protected void onLongClickAllAppsButton(View v) { if (LOGD) Log.d(TAG, "onLongClickAllAppsButton"); if (!isAppsViewVisible()) { getUserEventDispatcher().logActionOnControl(Action.Touch.LONGPRESS, ControlType.ALL_APPS_BUTTON); showAppsView(true /* animated */, true /* updatePredictedApps */, true /* focusSearchBar */); showAppsView(true /* animated */, true /* updatePredictedApps */); } } Loading Loading @@ -2750,13 +2738,6 @@ public class Launcher extends BaseActivity if (isWorkspaceLocked()) return false; if (mState != State.WORKSPACE) return false; if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator) || (v == mAllAppsButton && mAllAppsButton != null)) { onLongClickAllAppsButton(v); return true; } boolean ignoreLongPressToOverview = mDeviceProfile.shouldIgnoreLongPressToOverview(mLastDispatchTouchEventX); Loading Loading @@ -2956,13 +2937,12 @@ public class Launcher extends BaseActivity /** * Shows the apps view. */ public void showAppsView(boolean animated, boolean updatePredictedApps, boolean focusSearchBar) { public void showAppsView(boolean animated, boolean updatePredictedApps) { markAppsViewShown(); if (updatePredictedApps) { tryAndUpdatePredictedApps(); } showAppsOrWidgets(State.APPS, animated, focusSearchBar); showAppsOrWidgets(State.APPS, animated); } /** Loading @@ -2973,7 +2953,7 @@ public class Launcher extends BaseActivity if (resetPageToZero) { mWidgetsView.scrollToTop(); } showAppsOrWidgets(State.WIDGETS, animated, false); showAppsOrWidgets(State.WIDGETS, animated); mWidgetsView.post(new Runnable() { @Override Loading @@ -2990,7 +2970,7 @@ public class Launcher extends BaseActivity */ // TODO: calling method should use the return value so that when {@code false} is returned // the workspace transition doesn't fall into invalid state. private boolean showAppsOrWidgets(State toState, boolean animated, boolean focusSearchBar) { private boolean showAppsOrWidgets(State toState, boolean animated) { if (!(mState == State.WORKSPACE || mState == State.APPS_SPRING_LOADED || mState == State.WIDGETS_SPRING_LOADED || Loading @@ -3008,7 +2988,7 @@ public class Launcher extends BaseActivity } if (toState == State.APPS) { mStateTransitionAnimation.startAnimationToAllApps(animated, focusSearchBar); mStateTransitionAnimation.startAnimationToAllApps(animated); } else { mStateTransitionAnimation.startAnimationToWidgets(animated); } Loading Loading @@ -3081,8 +3061,7 @@ public class Launcher extends BaseActivity public void exitSpringLoadedDragMode() { if (mState == State.APPS_SPRING_LOADED) { showAppsView(true /* animated */, false /* updatePredictedApps */, false /* focusSearchBar */); showAppsView(true /* animated */, false /* updatePredictedApps */); } else if (mState == State.WIDGETS_SPRING_LOADED) { showWidgetsView(true, false); } else if (mState == State.WORKSPACE_SPRING_LOADED) { Loading Loading @@ -4095,7 +4074,7 @@ public class Launcher extends BaseActivity switch (keyCode) { case KeyEvent.KEYCODE_A: if (mState == State.WORKSPACE) { showAppsView(true, true, false); showAppsView(true, true); return true; } break; Loading
src/com/android/launcher3/LauncherStateTransitionAnimation.java +1 −8 Original line number Diff line number Diff line Loading @@ -127,12 +127,8 @@ public class LauncherStateTransitionAnimation { /** * Starts an animation to the apps view. * * @param startSearchAfterTransition Immediately starts app search after the transition to * All Apps is completed. */ public void startAnimationToAllApps( final boolean animated, final boolean startSearchAfterTransition) { public void startAnimationToAllApps(final boolean animated) { final AllAppsContainerView toView = mLauncher.getAppsView(); final View buttonView = mLauncher.getStartViewForAllAppsRevealAnimation(); PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks(1f) { Loading @@ -156,9 +152,6 @@ public class LauncherStateTransitionAnimation { @Override void onTransitionComplete() { mLauncher.getUserEventDispatcher().resetElapsedContainerMillis(); if (startSearchAfterTransition) { toView.startAppsSearch(); } } }; int animType = CIRCULAR_REVEAL; Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +0 −11 Original line number Diff line number Diff line Loading @@ -195,13 +195,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc return false; } /** * Focuses the search field and begins an app search. */ public void startAppsSearch() { mSearchUiManager.startAppsSearch(); } /** * Resets the state of AllApps. */ Loading Loading @@ -372,10 +365,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc targetParent.containerType = mAppsRecyclerView.getContainerType(v); } public boolean shouldRestoreImeState() { return mSearchUiManager.shouldRestoreImeState(); } @Override public void setInsets(Rect insets) { DeviceProfile grid = mLauncher.getDeviceProfile(); Loading
src/com/android/launcher3/allapps/AllAppsTransitionController.java +2 −6 Original line number Diff line number Diff line Loading @@ -227,9 +227,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul Action.Direction.UP, containerType); } mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */, false /* focusSearchBar */); mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */); if (hasSpringAnimationHandler()) { mSpringAnimationHandler.animateToFinalPosition(0); } Loading @@ -250,9 +248,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul Action.Direction.UP, containerType); } mLauncher.showAppsView(true, /* animated */ false /* updatePredictedApps */, false /* focusSearchBar */); mLauncher.showAppsView(true, /* animated */ false /* updatePredictedApps */); } } } Loading