Package org.robolectric.shadows
Class ShadowUIModeManager
java.lang.Object
org.robolectric.shadows.ShadowUIModeManager
Shadow for
UiModeManager.-
Field Summary
FieldsModifier and TypeFieldDescriptionintintintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddisableCarMode(int flags) protected voidenableCarMode(int flags) protected voidenableCarMode(int priority, int flags) intprotected intprotected intprotected intgetProjectingPackages(int projectionType) booleanReturns whether night mode is currently on when a custom night mode type is selected.protected booleanreleaseProjection(int projectionType) protected booleanrequestProjection(int projectionType) protected voidsetApplicationNightMode(int mode) voidsetCurrentModeType(int modeType) voidsetFailOnProjectionToggle(boolean failOnProjectionToggle) protected voidsetNightMode(int mode) protected booleansetNightModeActivatedForCustomMode(int mode, boolean active) protected voidsetNightModeCustomType(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)
-