Package org.robolectric.shadows
Class ShadowUIModeManager
java.lang.Object
org.robolectric.shadows.ShadowUIModeManager
Shadow for
UiModeManager
.-
Field Summary
Modifier and TypeFieldDescriptionint
int
int
int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
disableCarMode
(int flags) protected void
enableCarMode
(int flags) protected void
enableCarMode
(int priority, int flags) int
protected int
protected int
protected int
getProjectingPackages
(int projectionType) boolean
Returns whether night mode is currently on when a custom night mode type is selected.protected boolean
releaseProjection
(int projectionType) protected boolean
requestProjection
(int projectionType) protected void
setApplicationNightMode
(int mode) void
setCurrentModeType
(int modeType) void
setFailOnProjectionToggle
(boolean failOnProjectionToggle) protected void
setNightMode
(int mode) protected boolean
setNightModeActivatedForCustomMode
(int mode, boolean active) protected void
setNightModeCustomType
(int mode)
-
Field Details
-
currentModeType
public int currentModeType -
currentNightMode
public int currentNightMode -
lastFlags
public int lastFlags -
lastCarModePriority
public int lastCarModePriority
-
-
Constructor Details
-
ShadowUIModeManager
public ShadowUIModeManager()
-
-
Method Details
-
getCurrentModeType
-
setCurrentModeType
public void setCurrentModeType(int modeType) -
enableCarMode
-
enableCarMode
-
disableCarMode
-
getNightMode
-
setNightMode
-
getProjectingPackages
-
getApplicationNightMode
public int getApplicationNightMode() -
getActiveProjectionTypes
-
setFailOnProjectionToggle
public void setFailOnProjectionToggle(boolean failOnProjectionToggle) -
setApplicationNightMode
-
requestProjection
-
releaseProjection
-
getNightModeCustomType
-
isNightModeOn
public boolean isNightModeOn()Returns whether night mode is currently on when a custom night mode type is selected. -
setNightModeCustomType
-
setNightModeActivatedForCustomMode
@Implementation(minSdk=33) protected boolean setNightModeActivatedForCustomMode(int mode, boolean active)
-