@Implements(value=android.hardware.display.DisplayManager.class, minSdk=17, looseSignatures=true) public class ShadowDisplayManager extends Object
Constructor | Description |
---|---|
ShadowDisplayManager() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
__constructor__(Context context) |
|
static int |
addDisplay(String qualifiersStr) |
Adds a simulated display and drain the main looper queue to ensure all the callbacks are
processed.
|
static void |
changeDisplay(int displayId,
String qualifiersStr) |
Changes properties of a simulated display.
|
static void |
configureDefaultDisplay(Configuration configuration,
DisplayMetrics displayMetrics) |
internal only
|
float |
getSaturationLevel() |
Returns the current display saturation level set via
DisplayManager.setSaturationLevel(float) . |
static void |
removeDisplay(int displayId) |
Removes a simulated display and idles the main looper to ensure all listeners are notified.
|
protected void |
setBrightnessConfiguration(Object config) |
|
protected void |
setBrightnessConfigurationForUser(Object config,
int userId,
String packageName) |
|
static void |
setBrightnessEvents(List<BrightnessChangeEvent> events) |
Set the slider events the system has seen.
|
static void |
setDefaultBrightnessConfiguration(Object config) |
Set the default brightness configuration for this device.
|
void |
setSaturationLevel(float level) |
Sets the current display saturation level.
|
@Implementation protected void __constructor__(Context context)
public static int addDisplay(String qualifiersStr)
qualifiersStr
- the Qualifiers
string representing characteristics of the new
display.public static void configureDefaultDisplay(Configuration configuration, DisplayMetrics displayMetrics)
public static void changeDisplay(int displayId, String qualifiersStr)
Idles the main looper to ensure all listeners are notified.
displayId
- the display id to changequalifiersStr
- the Qualifiers
string representing characteristics of the new
displaypublic static void removeDisplay(int displayId)
displayId
- the display id to removepublic float getSaturationLevel()
DisplayManager.setSaturationLevel(float)
.public void setSaturationLevel(float level)
SystemApi
,
DisplayManager.setSaturationLevel(float)
.@Implementation(minSdk=28) @HiddenApi protected void setBrightnessConfiguration(Object config)
@Implementation(minSdk=28) @HiddenApi protected void setBrightnessConfigurationForUser(Object config, int userId, String packageName)
public static void setDefaultBrightnessConfiguration(Object config)
public static void setBrightnessEvents(List<BrightnessChangeEvent> events)