public class DisplayDensityUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SUMMARY_DEFAULT
Summary used for "default" scale.
|
Constructor and Description |
---|
DisplayDensityUtils(Context context) |
Modifier and Type | Method and Description |
---|---|
static void |
clearForcedDisplayDensity(int displayId)
Asynchronously applies display density changes to the specified display.
|
int |
getCurrentIndex() |
int |
getDefaultDensity() |
String[] |
getEntries() |
int[] |
getValues() |
static void |
setForcedDisplayDensity(int displayId,
int density)
Asynchronously applies display density changes to the specified display.
|
public static final int SUMMARY_DEFAULT
public DisplayDensityUtils(Context context)
public String[] getEntries()
public int[] getValues()
public int getCurrentIndex()
public int getDefaultDensity()
public static void clearForcedDisplayDensity(int displayId)
The change will be applied to the user specified by the value of
UserHandle.myUserId()
at the time the method is called.
displayId
- the identifier of the display to modifypublic static void setForcedDisplayDensity(int displayId, int density)
The change will be applied to the user specified by the value of
UserHandle.myUserId()
at the time the method is called.
displayId
- the identifier of the display to modifydensity
- the density to force for the specified display