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

Commit de5be156 authored by Pat Manning's avatar Pat Manning Committed by Android (Google) Code Review
Browse files

Merge "Show splash screen in quickswitch if thumbnail wrong aspect/orientation." into tm-qpr-dev

parents e700efde 0041ae35
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
    <dimen name="task_thumbnail_icon_drawable_size">44dp</dimen>
    <dimen name="overview_task_margin">16dp</dimen>
    <dimen name="overview_page_spacing">16dp</dimen>
    <dimen name="task_icon_cache_default_icon_size">72dp</dimen>

    <item name="overview_max_scale" format="float" type="dimen">0.7</item>
    <item name="overview_modal_max_scale" format="float" type="dimen">1.1</item>
+5 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TR
import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.launcher3.testing.TestProtocol.BAD_STATE;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET;
import static com.android.quickstep.views.RecentsView.OVERVIEW_PROGRESS;
import static com.android.quickstep.views.RecentsView.RECENTS_GRID_PROGRESS;
import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY;
import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION;
@@ -74,6 +75,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
        getTaskModalnessProperty().set(mRecentsView, state.getOverviewModalness());
        RECENTS_GRID_PROGRESS.set(mRecentsView,
                state.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f);
        OVERVIEW_PROGRESS.set(mRecentsView, state == LauncherState.OVERVIEW ? 1f : 0f);
    }

    @Override
@@ -117,6 +119,9 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
        boolean showAsGrid = toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile());
        setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f,
                showAsGrid ? INSTANT : FINAL_FRAME);

        setter.setFloat(mRecentsView, OVERVIEW_PROGRESS,
                toState == LauncherState.OVERVIEW ? 1f : 0f, INSTANT);
    }

    abstract FloatProperty getTaskModalnessProperty();
+2 −1
Original line number Diff line number Diff line
@@ -263,7 +263,8 @@ public class TaskIconCache implements DisplayInfoChangeListener {
        if (mIconFactory == null) {
            mIconFactory = new BaseIconFactory(mContext,
                    DisplayController.INSTANCE.get(mContext).getInfo().getDensityDpi(),
                    mContext.getResources().getDimensionPixelSize(R.dimen.taskbar_icon_size));
                    mContext.getResources().getDimensionPixelSize(
                            R.dimen.task_icon_cache_default_icon_size));
        }
        return mIconFactory;
    }
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.quickstep.fallback.RecentsState.OVERVIEW_SPLIT_SELECT;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET;
import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS;
import static com.android.quickstep.views.RecentsView.OVERVIEW_PROGRESS;
import static com.android.quickstep.views.RecentsView.RECENTS_GRID_PROGRESS;
import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY;
import static com.android.quickstep.views.RecentsView.TASK_MODALNESS;
@@ -105,6 +106,8 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
        boolean showAsGrid = state.displayOverviewTasksAsGrid(mActivity.getDeviceProfile());
        setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f,
                showAsGrid ? INSTANT : FINAL_FRAME);
        setter.setFloat(mRecentsView, OVERVIEW_PROGRESS, state == RecentsState.DEFAULT ? 1f : 0f,
                INSTANT);

        setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity),
                config.getInterpolator(ANIM_SCRIM_FADE, LINEAR));
+8 −0
Original line number Diff line number Diff line
package com.android.quickstep.views;

import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.util.SplitConfigurationOptions.DEFAULT_SPLIT_RATIO;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
@@ -313,4 +314,11 @@ public class GroupedTaskView extends TaskView {
        mSnapshotView2.setDimAlpha(amount);
        mDigitalWellBeingToast2.setBannerColorTint(tintColor, amount);
    }

    @Override
    protected void applyThumbnailSplashAlpha() {
        super.applyThumbnailSplashAlpha();
        mSnapshotView2.setSplashAlpha(
                Utilities.mapToRange(mOverviewProgress, 0f, 1f, 1f, 0f, LINEAR));
    }
}
Loading