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

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

Merge "Enabling doc centric recents on phones."

parents 7bdcc0b1 f9f2314a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3003,7 +3003,9 @@ public final class ActivityThread {
                int h;
                if (w < 0) {
                    Resources res = r.activity.getResources();
                    if (SystemProperties.getBoolean("persist.recents.use_alternate", false)) {
                    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);
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ public class Recents extends SystemUI implements RecentsComponent {

    @Override
    public void start() {
        mUseAlternateRecents = SystemProperties.getBoolean("persist.recents.use_alternate", false);
        Configuration config = mContext.getResources().getConfiguration();
        mUseAlternateRecents = (config.smallestScreenWidthDp < 600);
        if (mUseAlternateRecents) {
            if (mAlternateRecents == null) {
                mAlternateRecents = new AlternateRecentsComponent(mContext);
+3 −1
Original line number Diff line number Diff line
@@ -735,7 +735,9 @@ final class ActivityStack {
        int w = mThumbnailWidth;
        int h = mThumbnailHeight;
        if (w < 0) {
            if (SystemProperties.getBoolean("persist.recents.use_alternate", false)) {
            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 =
+3 −5
Original line number Diff line number Diff line
@@ -162,13 +162,10 @@ public class AppTransition implements Dump {
    private final Interpolator mThumbnailFadeoutInterpolator;

    private int mCurrentUserId = 0;
    private boolean mUseAlternateThumbnailAnimation;

    AppTransition(Context context, Handler h) {
        mContext = context;
        mH = h;
        mUseAlternateThumbnailAnimation =
                SystemProperties.getBoolean("persist.anim.use_alt_thumbnail", false);
        mConfigShortAnimTime = context.getResources().getInteger(
                com.android.internal.R.integer.config_shortAnimTime);
        mDecelerateInterpolator = AnimationUtils.loadInterpolator(context,
@@ -668,7 +665,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) {
                            Rect containingFrame, Rect contentInsets, Configuration configuration) {
        Animation a;
        if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CUSTOM) {
            a = loadAnimation(mNextAppTransitionPackage, enter ?
@@ -689,7 +686,8 @@ public class AppTransition implements Dump {
                mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN) {
            mNextAppTransitionScaleUp =
                    (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP);
            if (mUseAlternateThumbnailAnimation) {
            boolean useAlternateThumbnailAnimation = (configuration.smallestScreenWidthDp < 600);
            if (useAlternateThumbnailAnimation) {
                a = createAlternateThumbnailEnterExitAnimationLocked(
                        getThumbnailTransitionState(enter), appWidth, appHeight, orientation,
                        transit, containingFrame, contentInsets);
+2 −3
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.orientation, containingFrame, contentInsets, mCurConfiguration);
            if (a != null) {
                if (DEBUG_ANIM) {
                    RuntimeException e = null;
@@ -8660,8 +8660,7 @@ public class WindowManagerService extends IWindowManager.Stub
                wtoken.deferClearAllDrawn = false;
            }

            boolean useAlternateThumbnailAnimation =
                            SystemProperties.getBoolean("persist.anim.use_alt_thumbnail", false);
            boolean useAlternateThumbnailAnimation = (mCurConfiguration.smallestScreenWidthDp < 600);
            AppWindowAnimator appAnimator =
                    topOpeningApp == null ? null : topOpeningApp.mAppAnimator;
            Bitmap nextAppTransitionThumbnail = mAppTransition.getNextAppTransitionThumbnail();