Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +3 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class PreviewPositionHelper { */ public void updateThumbnailMatrix(Rect thumbnailBounds, ThumbnailData thumbnailData, int canvasWidth, int canvasHeight, int screenWidthPx, int screenHeightPx, int taskbarSize, boolean isLargeScreen, int taskbarSize, boolean isTablet, int currentRotation, boolean isRtl) { boolean isRotated = false; boolean isOrientationDifferent; Loading Loading @@ -95,7 +95,7 @@ public class PreviewPositionHelper { canvasScreenRatio = (float) canvasWidth / screenWidthPx; } scaledTaskbarSize = taskbarSize * canvasScreenRatio; thumbnailClipHint.bottom = isLargeScreen ? scaledTaskbarSize : 0; thumbnailClipHint.bottom = isTablet ? scaledTaskbarSize : 0; float scale = thumbnailData.scale; final float thumbnailScale; Loading @@ -103,7 +103,7 @@ public class PreviewPositionHelper { // Landscape vs portrait change. // Note: Disable rotation in grid layout. boolean windowingModeSupportsRotation = thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN && !isLargeScreen; thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN && !isTablet; isOrientationDifferent = isOrientationChange(deltaRotate) && windowingModeSupportsRotation; if (canvasWidth == 0 || canvasHeight == 0 || scale == 0) { Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/Utilities.java +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class Utilities { /** @return whether or not {@param context} represents that of a large screen device or not */ @TargetApi(Build.VERSION_CODES.R) public static boolean isLargeScreen(Context context) { public static boolean isTablet(Context context) { final WindowManager windowManager = context.getSystemService(WindowManager.class); final Rect bounds = windowManager.getCurrentWindowMetrics().getBounds(); Loading packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java +1 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,7 @@ final class WirelessChargingLayout extends FrameLayout { animatorSet.playTogether(textSizeAnimator, textOpacityAnimator, textFadeAnimator); // For tablet docking animation, we don't play the background scrim. // TODO(b/270524780): use utility to check for tablet instead. if (!Utilities.isLargeScreen(context)) { if (!Utilities.isTablet(context)) { ValueAnimator scrimFadeInAnimator = ObjectAnimator.ofArgb(this, "backgroundColor", Color.TRANSPARENT, SCRIM_COLOR); scrimFadeInAnimator.setDuration(SCRIM_FADE_DURATION); Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +3 −3 Original line number Diff line number Diff line Loading @@ -945,9 +945,9 @@ class KeyguardUnlockAnimationController @Inject constructor( return false } // We don't do the shared element on large screens because the smartspace has to fly across // large distances, which is distracting. if (Utilities.isLargeScreen(context)) { // We don't do the shared element on tablets because they're large and the smartspace has to // fly across large distances, which is distracting. if (Utilities.isTablet(context)) { return false } Loading packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionTaskView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import com.android.systemui.R import com.android.systemui.mediaprojection.appselector.data.RecentTask import com.android.systemui.shared.recents.model.ThumbnailData import com.android.systemui.shared.recents.utilities.PreviewPositionHelper import com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen import com.android.systemui.shared.recents.utilities.Utilities.isTablet /** * Custom view that shows a thumbnail preview of one recent task based on [ThumbnailData]. Loading Loading @@ -150,9 +150,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 val displayWidthPx = windowMetrics.bounds.width() val displayHeightPx = windowMetrics.bounds.height() val isRtl = layoutDirection == LAYOUT_DIRECTION_RTL val isLargeScreen = isLargeScreen(context) val isTablet = isTablet(context) val taskbarSize = if (isLargeScreen) { if (isTablet) { resources.getDimensionPixelSize(AndroidR.dimen.taskbar_frame_height) } else { 0 Loading @@ -166,7 +166,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 displayWidthPx, displayHeightPx, taskbarSize, isLargeScreen, isTablet, currentRotation, isRtl ) Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/PreviewPositionHelper.java +3 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class PreviewPositionHelper { */ public void updateThumbnailMatrix(Rect thumbnailBounds, ThumbnailData thumbnailData, int canvasWidth, int canvasHeight, int screenWidthPx, int screenHeightPx, int taskbarSize, boolean isLargeScreen, int taskbarSize, boolean isTablet, int currentRotation, boolean isRtl) { boolean isRotated = false; boolean isOrientationDifferent; Loading Loading @@ -95,7 +95,7 @@ public class PreviewPositionHelper { canvasScreenRatio = (float) canvasWidth / screenWidthPx; } scaledTaskbarSize = taskbarSize * canvasScreenRatio; thumbnailClipHint.bottom = isLargeScreen ? scaledTaskbarSize : 0; thumbnailClipHint.bottom = isTablet ? scaledTaskbarSize : 0; float scale = thumbnailData.scale; final float thumbnailScale; Loading @@ -103,7 +103,7 @@ public class PreviewPositionHelper { // Landscape vs portrait change. // Note: Disable rotation in grid layout. boolean windowingModeSupportsRotation = thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN && !isLargeScreen; thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN && !isTablet; isOrientationDifferent = isOrientationChange(deltaRotate) && windowingModeSupportsRotation; if (canvasWidth == 0 || canvasHeight == 0 || scale == 0) { Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/Utilities.java +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class Utilities { /** @return whether or not {@param context} represents that of a large screen device or not */ @TargetApi(Build.VERSION_CODES.R) public static boolean isLargeScreen(Context context) { public static boolean isTablet(Context context) { final WindowManager windowManager = context.getSystemService(WindowManager.class); final Rect bounds = windowManager.getCurrentWindowMetrics().getBounds(); Loading
packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java +1 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,7 @@ final class WirelessChargingLayout extends FrameLayout { animatorSet.playTogether(textSizeAnimator, textOpacityAnimator, textFadeAnimator); // For tablet docking animation, we don't play the background scrim. // TODO(b/270524780): use utility to check for tablet instead. if (!Utilities.isLargeScreen(context)) { if (!Utilities.isTablet(context)) { ValueAnimator scrimFadeInAnimator = ObjectAnimator.ofArgb(this, "backgroundColor", Color.TRANSPARENT, SCRIM_COLOR); scrimFadeInAnimator.setDuration(SCRIM_FADE_DURATION); Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +3 −3 Original line number Diff line number Diff line Loading @@ -945,9 +945,9 @@ class KeyguardUnlockAnimationController @Inject constructor( return false } // We don't do the shared element on large screens because the smartspace has to fly across // large distances, which is distracting. if (Utilities.isLargeScreen(context)) { // We don't do the shared element on tablets because they're large and the smartspace has to // fly across large distances, which is distracting. if (Utilities.isTablet(context)) { return false } Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionTaskView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import com.android.systemui.R import com.android.systemui.mediaprojection.appselector.data.RecentTask import com.android.systemui.shared.recents.model.ThumbnailData import com.android.systemui.shared.recents.utilities.PreviewPositionHelper import com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen import com.android.systemui.shared.recents.utilities.Utilities.isTablet /** * Custom view that shows a thumbnail preview of one recent task based on [ThumbnailData]. Loading Loading @@ -150,9 +150,9 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 val displayWidthPx = windowMetrics.bounds.width() val displayHeightPx = windowMetrics.bounds.height() val isRtl = layoutDirection == LAYOUT_DIRECTION_RTL val isLargeScreen = isLargeScreen(context) val isTablet = isTablet(context) val taskbarSize = if (isLargeScreen) { if (isTablet) { resources.getDimensionPixelSize(AndroidR.dimen.taskbar_frame_height) } else { 0 Loading @@ -166,7 +166,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 displayWidthPx, displayHeightPx, taskbarSize, isLargeScreen, isTablet, currentRotation, isRtl ) Loading