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

Commit 7c0c77e9 authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Make small tablet threshold a shared constant" into main

parents 833b3238 6b1fff5e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;
}
+2 −1
Original line number Diff line number Diff line
@@ -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 {