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

Commit 9aeb6073 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Enabling alternate recents on all form factors."

parents c47bb2a3 fd086225
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -3010,19 +3010,10 @@ public final class ActivityThread {
                int h;
                if (w < 0) {
                    Resources res = r.activity.getResources();
                    Configuration config = res.getConfiguration();
                    boolean useAlternateRecents = (config.smallestScreenWidthDp < 600);
                    if (useAlternateRecents) {
                    int wId = com.android.internal.R.dimen.recents_thumbnail_width;
                    int hId = com.android.internal.R.dimen.recents_thumbnail_height;
                    mThumbnailWidth = w = res.getDimensionPixelSize(wId);
                    mThumbnailHeight = h = res.getDimensionPixelSize(hId);
                    } else {
                        mThumbnailHeight = h =
                            res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height);
                        mThumbnailWidth = w =
                            res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);
                    }
                } else {
                    h = mThumbnailHeight;
                }
+1 −3
Original line number Diff line number Diff line
@@ -44,14 +44,12 @@ public class Recents extends SystemUI implements RecentsComponent {
    private static final boolean DEBUG = true;

    // Which recents to use
    boolean mUseAlternateRecents;
    boolean mUseAlternateRecents = true;
    AlternateRecentsComponent mAlternateRecents;
    boolean mBootCompleted = false;

    @Override
    public void start() {
        Configuration config = mContext.getResources().getConfiguration();
        mUseAlternateRecents = (config.smallestScreenWidthDp < 600);
        if (mUseAlternateRecents) {
            if (mAlternateRecents == null) {
                mAlternateRecents = new AlternateRecentsComponent(mContext);
+4 −13
Original line number Diff line number Diff line
@@ -742,19 +742,10 @@ final class ActivityStack {
        int w = mThumbnailWidth;
        int h = mThumbnailHeight;
        if (w < 0) {
            Configuration config = res.getConfiguration();
            boolean useAlternateRecents = (config.smallestScreenWidthDp < 600);
            if (useAlternateRecents) {
            mThumbnailWidth = w =
               res.getDimensionPixelSize(com.android.internal.R.dimen.recents_thumbnail_width);
            mThumbnailHeight = h =
               res.getDimensionPixelSize(com.android.internal.R.dimen.recents_thumbnail_height);
            } else {
                mThumbnailWidth = w =
                    res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);
                mThumbnailHeight = h =
                    res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height);
            }
        }

        if (w > 0) {
+4 −10
Original line number Diff line number Diff line
@@ -679,7 +679,7 @@ public class AppTransition implements Dump {

    Animation loadAnimation(WindowManager.LayoutParams lp, int transit, boolean enter,
                            int appWidth, int appHeight, int orientation,
                            Rect containingFrame, Rect contentInsets, Configuration configuration) {
                            Rect containingFrame, Rect contentInsets) {
        Animation a;
        if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CUSTOM) {
            a = loadAnimation(mNextAppTransitionPackage, enter ?
@@ -700,15 +700,9 @@ public class AppTransition implements Dump {
                mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN) {
            mNextAppTransitionScaleUp =
                    (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP);
            boolean useAlternateThumbnailAnimation = (configuration.smallestScreenWidthDp < 600);
            if (useAlternateThumbnailAnimation) {
            a = createAlternateThumbnailEnterExitAnimationLocked(
                    getThumbnailTransitionState(enter), appWidth, appHeight, orientation,
                    transit, containingFrame, contentInsets);
            } else {
                a = createThumbnailEnterExitAnimationLocked(getThumbnailTransitionState(enter),
                        appWidth, appHeight, transit);
            }
            if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
                String animName = mNextAppTransitionScaleUp ?
                        "ANIM_THUMBNAIL_SCALE_UP" : "ANIM_THUMBNAIL_SCALE_DOWN";
+2 −2
Original line number Diff line number Diff line
@@ -3194,7 +3194,7 @@ public class WindowManagerService extends IWindowManager.Stub
            }

            Animation a = mAppTransition.loadAnimation(lp, transit, enter, width, height,
                    mCurConfiguration.orientation, containingFrame, contentInsets, mCurConfiguration);
                    mCurConfiguration.orientation, containingFrame, contentInsets);
            if (a != null) {
                if (DEBUG_ANIM) {
                    RuntimeException e = null;
@@ -8677,7 +8677,7 @@ public class WindowManagerService extends IWindowManager.Stub
                wtoken.deferClearAllDrawn = false;
            }

            boolean useAlternateThumbnailAnimation = (mCurConfiguration.smallestScreenWidthDp < 600);
            boolean useAlternateThumbnailAnimation = true;
            AppWindowAnimator appAnimator =
                    topOpeningApp == null ? null : topOpeningApp.mAppAnimator;
            Bitmap nextAppTransitionThumbnail = mAppTransition.getNextAppTransitionThumbnail();