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

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

Merge "Add split placeholder view above OverviewScrim" into sc-dev

parents 2e0eee4d e3f7d0d1
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -19,8 +19,7 @@
        android:id="@+id/split_placeholder"
        android:id="@+id/split_placeholder"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="@dimen/split_placeholder_size"
        android:layout_height="@dimen/split_placeholder_size"
        android:background="@android:color/white"
        android:background="@android:color/darker_gray"
        android:alpha=".8"
        android:visibility="gone" />
        android:visibility="gone" />


    <com.android.quickstep.views.LauncherRecentsView
    <com.android.quickstep.views.LauncherRecentsView
+8 −3
Original line number Original line Diff line number Diff line
@@ -92,6 +92,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
    private final TaskbarStateHandler mTaskbarStateHandler = new TaskbarStateHandler(this);
    private final TaskbarStateHandler mTaskbarStateHandler = new TaskbarStateHandler(this);
    // Will be updated when dragging from taskbar.
    // Will be updated when dragging from taskbar.
    private @Nullable DragOptions mNextWorkspaceDragOptions = null;
    private @Nullable DragOptions mNextWorkspaceDragOptions = null;
    private SplitPlaceholderView mSplitPlaceholderView;


    @Override
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    protected void onCreate(Bundle savedInstanceState) {
@@ -215,12 +216,12 @@ public abstract class BaseQuickstepLauncher extends Launcher


        SysUINavigationMode.INSTANCE.get(this).updateMode();
        SysUINavigationMode.INSTANCE.get(this).updateMode();
        mActionsView = findViewById(R.id.overview_actions_view);
        mActionsView = findViewById(R.id.overview_actions_view);
        SplitPlaceholderView splitPlaceholderView = findViewById(R.id.split_placeholder);
        mSplitPlaceholderView = findViewById(R.id.split_placeholder);
        RecentsView overviewPanel = (RecentsView) getOverviewPanel();
        RecentsView overviewPanel = (RecentsView) getOverviewPanel();
        splitPlaceholderView.init(
        mSplitPlaceholderView.init(
                new SplitSelectStateController(SystemUiProxy.INSTANCE.get(this))
                new SplitSelectStateController(SystemUiProxy.INSTANCE.get(this))
        );
        );
        overviewPanel.init(mActionsView, splitPlaceholderView);
        overviewPanel.init(mActionsView, mSplitPlaceholderView);
        mActionsView.updateVerticalMargin(SysUINavigationMode.getMode(this));
        mActionsView.updateVerticalMargin(SysUINavigationMode.getMode(this));


        mAppTransitionManager = new QuickstepTransitionManager(this);
        mAppTransitionManager = new QuickstepTransitionManager(this);
@@ -256,6 +257,10 @@ public abstract class BaseQuickstepLauncher extends Launcher
        return (T) mActionsView;
        return (T) mActionsView;
    }
    }


    public SplitPlaceholderView getSplitPlaceholderView() {
        return mSplitPlaceholderView;
    }

    @Override
    @Override
    protected void closeOpenViews(boolean animate) {
    protected void closeOpenViews(boolean animate) {
        super.closeOpenViews(animate);
        super.closeOpenViews(animate);
+5 −0
Original line number Original line Diff line number Diff line
@@ -116,6 +116,11 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
        setter.setFloat(scrim, SCRIM_MULTIPLIER, 1f,
        setter.setFloat(scrim, SCRIM_MULTIPLIER, 1f,
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
                config.getInterpolator(ANIM_OVERVIEW_SCRIM_FADE, LINEAR));
        if (toState.areElementsVisible(mLauncher, LauncherState.SPLIT_PLACHOLDER_VIEW)) {
            scrim.updateStableScrimmedView(mLauncher.getSplitPlaceholderView());
        } else {
            scrim.updateStableScrimmedView(mLauncher.getOverviewPanel());
        }


        setter.setFloat(
        setter.setFloat(
                mRecentsView, getTaskModalnessProperty(),
                mRecentsView, getTaskModalnessProperty(),
+1 −1
Original line number Original line Diff line number Diff line
@@ -113,7 +113,7 @@ public final class RecentsViewStateController extends
                        ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));
                        ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));


        float splitPlaceholderAlpha = state.areElementsVisible(mLauncher, SPLIT_PLACHOLDER_VIEW) ?
        float splitPlaceholderAlpha = state.areElementsVisible(mLauncher, SPLIT_PLACHOLDER_VIEW) ?
                1 : 0;
                0.7f : 0;
        propertySetter.setFloat(mRecentsView.getSplitPlaceholder(), ALPHA_FLOAT,
        propertySetter.setFloat(mRecentsView.getSplitPlaceholder(), ALPHA_FLOAT,
                splitPlaceholderAlpha, LINEAR);
                splitPlaceholderAlpha, LINEAR);
    }
    }
+7 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,13 @@ public class OverviewScrim extends Scrim {
        mStableScrimmedView = mCurrentScrimmedView = mLauncher.getOverviewPanel();
        mStableScrimmedView = mCurrentScrimmedView = mLauncher.getOverviewPanel();
    }
    }


    /**
     * @param view The view we want the scrim to be behind
     */
    public void updateStableScrimmedView(View view) {
        mStableScrimmedView = view;
    }

    public void updateCurrentScrimmedView(ViewGroup root) {
    public void updateCurrentScrimmedView(ViewGroup root) {
        // Find the lowest view that is at or above the view we want to show the scrim behind.
        // Find the lowest view that is at or above the view we want to show the scrim behind.
        mCurrentScrimmedView = mStableScrimmedView;
        mCurrentScrimmedView = mStableScrimmedView;
Loading