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

Commit b55b6264 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove LAUNCHER3_ALL_APPS_PULL_UP Bug: 63712253 Verified: all apps...

Merge "Remove LAUNCHER3_ALL_APPS_PULL_UP Bug: 63712253 Verified: all apps transition fully functional Verified: NO_ALL_APPS_ICON = false case also works." into ub-launcher3-dorval-polish2
parents ee804af7 d725f644
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public abstract class BaseContainerView extends FrameLayout
    public BaseContainerView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && this instanceof AllAppsContainerView) {
        if (this instanceof AllAppsContainerView) {
            mBaseDrawable = new ColorDrawable();
        } else {
            TypedArray a = context.obtainStyledAttributes(attrs,
+2 −4
Original line number Diff line number Diff line
@@ -1310,9 +1310,7 @@ public class Launcher extends BaseActivity
        mDragController.addDropTarget(mWorkspace);
        mDropTargetBar.setup(mDragController);

        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
        mAllAppsController.setupViews(mAppsView, mHotseat, mWorkspace);
        }

        if (TestingUtils.MEMORY_DUMP_ENABLED) {
            TestingUtils.addWeightWatcher(this);
@@ -2280,7 +2278,7 @@ public class Launcher extends BaseActivity
            if (v instanceof FolderIcon) {
                onClickFolderIcon(v);
            }
        } else if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator) ||
        } else if ((v instanceof PageIndicator) ||
            (v == mAllAppsButton && mAllAppsButton != null)) {
            onClickAllAppsButton(v);
        } else if (tag instanceof AppInfo) {
+6 −18
Original line number Diff line number Diff line
@@ -80,13 +80,11 @@ import com.android.launcher3.widget.WidgetsContainerView;
public class LauncherStateTransitionAnimation {

    /**
     * animation used for all apps and widget tray when
     *{@link FeatureFlags#LAUNCHER3_ALL_APPS_PULL_UP} is {@code false}
     * animation used for the widget tray
     */
    public static final int CIRCULAR_REVEAL = 0;
    /**
     * animation used for all apps and not widget tray when
     *{@link FeatureFlags#LAUNCHER3_ALL_APPS_PULL_UP} is {@code true}
     * animation used for all apps tray
     */
    public static final int PULLUP = 1;

@@ -154,13 +152,9 @@ public class LauncherStateTransitionAnimation {
                mLauncher.getUserEventDispatcher().resetElapsedContainerMillis();
            }
        };
        int animType = CIRCULAR_REVEAL;
        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
            animType = PULLUP;
        }
        // Only animate the search bar if animating from spring loaded mode back to all apps
        startAnimationToOverlay(
                Workspace.State.NORMAL_HIDDEN, buttonView, toView, animated, animType, cb);
                Workspace.State.NORMAL_HIDDEN, buttonView, toView, animated, PULLUP, cb);
    }

    /**
@@ -193,12 +187,8 @@ public class LauncherStateTransitionAnimation {

        if (fromState == Launcher.State.APPS || fromState == Launcher.State.APPS_SPRING_LOADED
                || mAllAppsController.isTransitioning()) {
            int animType = CIRCULAR_REVEAL;
            if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
                animType = PULLUP;
            }
            startAnimationToWorkspaceFromAllApps(fromWorkspaceState, toWorkspaceState,
                    animated, animType, onCompleteRunnable);
                    animated, PULLUP, onCompleteRunnable);
        } else if (fromState == Launcher.State.WIDGETS ||
                fromState == Launcher.State.WIDGETS_SPRING_LOADED) {
            startAnimationToWorkspaceFromWidgets(fromWorkspaceState, toWorkspaceState,
@@ -235,8 +225,7 @@ public class LauncherStateTransitionAnimation {
        playCommonTransitionAnimations(toWorkspaceState,
                animated, initialized, animation, layerViews);
        if (!animated || !initialized) {
            if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP &&
                    toWorkspaceState == Workspace.State.NORMAL_HIDDEN) {
            if (toWorkspaceState == Workspace.State.NORMAL_HIDDEN) {
                mAllAppsController.finishPullUp();
            }
            toView.setTranslationX(0.0f);
@@ -527,8 +516,7 @@ public class LauncherStateTransitionAnimation {
        playCommonTransitionAnimations(toWorkspaceState,
                animated, initialized, animation, layerViews);
        if (!animated || !initialized) {
            if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP &&
                    fromWorkspaceState == Workspace.State.NORMAL_HIDDEN) {
            if (fromWorkspaceState == Workspace.State.NORMAL_HIDDEN) {
                mAllAppsController.finishPullDown();
            }
            fromView.setVisibility(View.GONE);
+4 −6
Original line number Diff line number Diff line
@@ -273,9 +273,8 @@ public class WorkspaceStateTransitionAnimation {
        float finalBackgroundAlpha = (states.stateIsSpringLoaded || states.stateIsOverview) ?
                1.0f : 0f;
        float finalHotseatAlpha = (states.stateIsNormal || states.stateIsSpringLoaded ||
                (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f;
        float finalQsbAlpha = (states.stateIsNormal ||
                (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && states.stateIsNormalHidden)) ? 1f : 0f;
                states.stateIsNormalHidden) ? 1f : 0f;
        float finalQsbAlpha = (states.stateIsNormal || states.stateIsNormalHidden) ? 1f : 0f;

        float finalWorkspaceTranslationY = 0;
        if (states.stateIsOverview || states.stateIsOverviewHidden) {
@@ -312,8 +311,7 @@ public class WorkspaceStateTransitionAnimation {
            if (states.stateIsOverviewHidden) {
                finalAlpha = 0f;
            } else if(states.stateIsNormalHidden) {
                finalAlpha = (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP &&
                        i == mWorkspace.getNextPage()) ? 1 : 0;
                finalAlpha = (i == mWorkspace.getNextPage()) ? 1 : 0;
            } else if (states.stateIsNormal && mWorkspaceFadeInAdjacentScreens) {
                finalAlpha = (i == toPage || i < customPageCount) ? 1f : 0f;
            } else {
@@ -322,7 +320,7 @@ public class WorkspaceStateTransitionAnimation {

            // If we are animating to/from the small state, then hide the side pages and fade the
            // current page in
            if (!FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && !mWorkspace.isSwitchingState()) {
            if (!FeatureFlags.NO_ALL_APPS_ICON && !mWorkspace.isSwitchingState()) {
                if (states.workspaceToAllApps || states.allAppsToWorkspace) {
                    boolean isCurrentPage = (i == toPage);
                    if (states.allAppsToWorkspace && isCurrentPage) {
+14 −37
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
    @Override
    protected void updateBackground(
            int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) {
        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
        if (mLauncher.getDeviceProfile().isVerticalBarLayout()) {
            getRevealView().setBackground(new InsetDrawable(mBaseDrawable,
                    paddingLeft, paddingTop, paddingRight, paddingBottom));
@@ -112,9 +111,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
        } else {
            getRevealView().setBackground(mBaseDrawable);
        }
        } else {
            super.updateBackground(paddingLeft, paddingTop, paddingRight, paddingBottom);
        }
    }

    /**
@@ -232,12 +228,10 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
        mAppsRecyclerView.preMeasureViews(mAdapter);
        mAdapter.setIconFocusListener(focusedItemDecorator.getFocusListener());

        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
        getRevealView().setVisibility(View.VISIBLE);
        getContentView().setVisibility(View.VISIBLE);
        getContentView().setBackground(null);
    }
    }

    public SearchUiManager getSearchUiManager() {
        return mSearchUiManager;
@@ -254,7 +248,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
        // Update the number of items in the grid before we measure the view
        grid.updateAppsViewNumCols();

        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
        if (mNumAppsPerRow != grid.inv.numColumns ||
                mNumPredictedAppsPerRow != grid.inv.numColumns) {
            mNumAppsPerRow = grid.inv.numColumns;
@@ -265,22 +258,6 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
            mApps.setNumAppsPerRow(mNumAppsPerRow, mNumPredictedAppsPerRow);
        }
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
            return;
        }

        // --- remove START when {@code FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP} is enabled. ---
        if (mNumAppsPerRow != grid.allAppsNumCols ||
                mNumPredictedAppsPerRow != grid.allAppsNumPredictiveCols) {
            mNumAppsPerRow = grid.allAppsNumCols;
            mNumPredictedAppsPerRow = grid.allAppsNumPredictiveCols;

            mAppsRecyclerView.setNumAppsPerRow(grid, mNumAppsPerRow);
            mAdapter.setNumAppsPerRow(mNumAppsPerRow);
            mApps.setNumAppsPerRow(mNumAppsPerRow, mNumPredictedAppsPerRow);
        }

        // --- remove END when {@code FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP} is enabled. ---
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override
Loading