Loading services/core/java/com/android/server/wm/AppTransition.java +15 −2 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.os.Debug; import android.os.IBinder; import android.os.IRemoteCallback; import android.os.RemoteException; import android.os.SystemProperties; import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -250,6 +251,8 @@ public class AppTransition implements Dump { private boolean mLastHadClipReveal; private boolean mProlongedAnimationsEnded; private final boolean mGridLayoutRecentsEnabled; AppTransition(Context context, WindowManagerService service) { mContext = context; mService = service; Loading Loading @@ -288,6 +291,7 @@ public class AppTransition implements Dump { }; mClipRevealTranslationY = (int) (CLIP_REVEAL_TRANSLATION_Y_DP * mContext.getResources().getDisplayMetrics().density); mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false); } boolean isTransitionSet() { Loading Loading @@ -952,7 +956,7 @@ public class AppTransition implements Dump { final float toY; final float pivotX; final float pivotY; if (isTvUiMode(uiMode) || orientation == Configuration.ORIENTATION_PORTRAIT) { if (shouldScaleDownThumbnailTransition(uiMode, orientation)) { fromX = mTmpRect.left; fromY = mTmpRect.top; Loading Loading @@ -1123,7 +1127,7 @@ public class AppTransition implements Dump { mTmpFromClipRect.inset(contentInsets); mNextAppTransitionInsets.set(contentInsets); if (isTvUiMode(uiMode) || orientation == Configuration.ORIENTATION_PORTRAIT) { if (shouldScaleDownThumbnailTransition(uiMode, orientation)) { // We scale the width and clip to the top/left square float scale = thumbWidth / (appWidth - contentInsets.left - contentInsets.right); Loading Loading @@ -2036,6 +2040,15 @@ public class AppTransition implements Dump { || transit == TRANSIT_KEYGUARD_UNOCCLUDE; } /** * @return whether the transition should show the thumbnail being scaled down. */ private boolean shouldScaleDownThumbnailTransition(int uiMode, int orientation) { return isTvUiMode(uiMode) || mGridLayoutRecentsEnabled || orientation == Configuration.ORIENTATION_PORTRAIT; } /** * @return whether the specified {@param uiMode} is the TV mode. */ Loading Loading
services/core/java/com/android/server/wm/AppTransition.java +15 −2 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.os.Debug; import android.os.IBinder; import android.os.IRemoteCallback; import android.os.RemoteException; import android.os.SystemProperties; import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -250,6 +251,8 @@ public class AppTransition implements Dump { private boolean mLastHadClipReveal; private boolean mProlongedAnimationsEnded; private final boolean mGridLayoutRecentsEnabled; AppTransition(Context context, WindowManagerService service) { mContext = context; mService = service; Loading Loading @@ -288,6 +291,7 @@ public class AppTransition implements Dump { }; mClipRevealTranslationY = (int) (CLIP_REVEAL_TRANSLATION_Y_DP * mContext.getResources().getDisplayMetrics().density); mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false); } boolean isTransitionSet() { Loading Loading @@ -952,7 +956,7 @@ public class AppTransition implements Dump { final float toY; final float pivotX; final float pivotY; if (isTvUiMode(uiMode) || orientation == Configuration.ORIENTATION_PORTRAIT) { if (shouldScaleDownThumbnailTransition(uiMode, orientation)) { fromX = mTmpRect.left; fromY = mTmpRect.top; Loading Loading @@ -1123,7 +1127,7 @@ public class AppTransition implements Dump { mTmpFromClipRect.inset(contentInsets); mNextAppTransitionInsets.set(contentInsets); if (isTvUiMode(uiMode) || orientation == Configuration.ORIENTATION_PORTRAIT) { if (shouldScaleDownThumbnailTransition(uiMode, orientation)) { // We scale the width and clip to the top/left square float scale = thumbWidth / (appWidth - contentInsets.left - contentInsets.right); Loading Loading @@ -2036,6 +2040,15 @@ public class AppTransition implements Dump { || transit == TRANSIT_KEYGUARD_UNOCCLUDE; } /** * @return whether the transition should show the thumbnail being scaled down. */ private boolean shouldScaleDownThumbnailTransition(int uiMode, int orientation) { return isTvUiMode(uiMode) || mGridLayoutRecentsEnabled || orientation == Configuration.ORIENTATION_PORTRAIT; } /** * @return whether the specified {@param uiMode} is the TV mode. */ Loading