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

Commit fd086225 authored by Winson Chung's avatar Winson Chung
Browse files

Enabling alternate recents on all form factors.

Change-Id: I9dec6da7646205b72f46cedf604fadfb03cab6d4
parent b09506da
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -3018,19 +3018,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
@@ -739,19 +739,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
@@ -3190,7 +3190,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;
@@ -8673,7 +8673,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();