diff options
| author | 2025-03-06 09:06:41 -0800 | |
|---|---|---|
| committer | 2025-03-06 09:06:41 -0800 | |
| commit | 7c0c77e92930c8ec04ba0cefdfcf8cc6e4883538 (patch) | |
| tree | 48f7f023657d1640ed7382a170e0232ac17c80b3 | |
| parent | 833b3238ffe91ac65ddfbc37552638dad6800a7c (diff) | |
| parent | 6b1fff5e059739d1b2d984063a37d7b7e49eea83 (diff) | |
Merge "Make small tablet threshold a shared constant" into main
| -rw-r--r-- | libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/ShellSharedConstants.java | 7 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DeviceConfig.kt | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/ShellSharedConstants.java b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/ShellSharedConstants.java index 01d2201a5a0c..8bcbd2a3fc9f 100644 --- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/ShellSharedConstants.java +++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/ShellSharedConstants.java @@ -22,4 +22,11 @@ package com.android.wm.shell.shared; public class ShellSharedConstants { public static final String KEY_EXTRA_SHELL_CAN_HAND_OFF_ANIMATION = "extra_shell_can_hand_off_animation"; + + /** + * Defines the max screen width or height in dp for a device to be considered a small tablet. + * + * @see android.view.WindowManager#LARGE_SCREEN_SMALLEST_SCREEN_WIDTH_DP + */ + public static final int SMALL_TABLET_MAX_EDGE_DP = 960; } diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DeviceConfig.kt b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DeviceConfig.kt index 1b7c9c282304..ad2671b8135d 100644 --- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DeviceConfig.kt +++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/DeviceConfig.kt @@ -26,6 +26,8 @@ import android.view.WindowInsets import android.view.WindowManager import kotlin.math.max +import com.android.wm.shell.shared.ShellSharedConstants.SMALL_TABLET_MAX_EDGE_DP + /** Contains device configuration used for positioning bubbles on the screen. */ data class DeviceConfig( val isLargeScreen: Boolean, @@ -38,7 +40,6 @@ data class DeviceConfig( companion object { private const val LARGE_SCREEN_MIN_EDGE_DP = 600 - private const val SMALL_TABLET_MAX_EDGE_DP = 960 @JvmStatic fun create(context: Context, windowManager: WindowManager): DeviceConfig { |