Add DENSITY_DEVICE_STABLE constant
The existing DENSITY_DEVICE gets updated by ActivityThread following configuration changes that affect density, so just a docs update there. Bug: 26854123 Change-Id: I69dfca99a6038ed9cf8b2f2c007cdbc4a399dd8a
This commit is contained in:
@@ -39885,6 +39885,7 @@ package android.util {
|
||||
field public static final int DENSITY_420 = 420; // 0x1a4
|
||||
field public static final int DENSITY_560 = 560; // 0x230
|
||||
field public static final int DENSITY_DEFAULT = 160; // 0xa0
|
||||
field public static final int DENSITY_DEVICE_STABLE;
|
||||
field public static final int DENSITY_HIGH = 240; // 0xf0
|
||||
field public static final int DENSITY_LOW = 120; // 0x78
|
||||
field public static final int DENSITY_MEDIUM = 160; // 0xa0
|
||||
|
||||
@@ -42302,6 +42302,7 @@ package android.util {
|
||||
field public static final int DENSITY_420 = 420; // 0x1a4
|
||||
field public static final int DENSITY_560 = 560; // 0x230
|
||||
field public static final int DENSITY_DEFAULT = 160; // 0xa0
|
||||
field public static final int DENSITY_DEVICE_STABLE;
|
||||
field public static final int DENSITY_HIGH = 240; // 0xf0
|
||||
field public static final int DENSITY_LOW = 120; // 0x78
|
||||
field public static final int DENSITY_MEDIUM = 160; // 0xa0
|
||||
|
||||
@@ -39902,6 +39902,7 @@ package android.util {
|
||||
field public static final int DENSITY_420 = 420; // 0x1a4
|
||||
field public static final int DENSITY_560 = 560; // 0x230
|
||||
field public static final int DENSITY_DEFAULT = 160; // 0xa0
|
||||
field public static final int DENSITY_DEVICE_STABLE;
|
||||
field public static final int DENSITY_HIGH = 240; // 0xf0
|
||||
field public static final int DENSITY_LOW = 120; // 0x78
|
||||
field public static final int DENSITY_MEDIUM = 160; // 0xa0
|
||||
|
||||
@@ -131,15 +131,28 @@ public class DisplayMetrics {
|
||||
public static final float DENSITY_DEFAULT_SCALE = 1.0f / DENSITY_DEFAULT;
|
||||
|
||||
/**
|
||||
* The device's density.
|
||||
* @hide because eventually this should be able to change while
|
||||
* running, so shouldn't be a constant.
|
||||
* @deprecated There is no longer a static density; you can find the
|
||||
* density for a display in {@link #densityDpi}.
|
||||
* The device's current density.
|
||||
* <p>
|
||||
* This value reflects any changes made to the device density. To obtain
|
||||
* the device's stable density, use {@link #DENSITY_DEVICE_STABLE}.
|
||||
*
|
||||
* @hide This value should not be used.
|
||||
* @deprecated Use {@link #DENSITY_DEVICE_STABLE} to obtain the stable
|
||||
* device density or {@link #densityDpi} to obtain the current
|
||||
* density for a specific display.
|
||||
*/
|
||||
@Deprecated
|
||||
public static int DENSITY_DEVICE = getDeviceDensity();
|
||||
|
||||
/**
|
||||
* The device's stable density.
|
||||
* <p>
|
||||
* This value is constant at run time and may not reflect the current
|
||||
* display density. To obtain the current density for a specific display,
|
||||
* use {@link #densityDpi}.
|
||||
*/
|
||||
public static final int DENSITY_DEVICE_STABLE = getDeviceDensity();
|
||||
|
||||
/**
|
||||
* The absolute width of the display in pixels.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user