Package org.robolectric.shadows
Class ShadowUIModeManager
java.lang.Object
org.robolectric.shadows.ShadowUIModeManager
@Implements(android.app.UiModeManager.class) public class ShadowUIModeManager extends Object
Shadow for
UiModeManager.-
Field Summary
Fields Modifier and Type Field Description intcurrentModeTypeintcurrentNightModeintlastCarModePriorityintlastFlags -
Constructor Summary
Constructors Constructor Description ShadowUIModeManager() -
Method Summary
Modifier and Type Method Description protected voiddisableCarMode(int flags)protected voidenableCarMode(int flags)protected voidenableCarMode(int priority, int flags)Set<Integer>getActiveProjectionTypes()intgetApplicationNightMode()protected intgetCurrentModeType()protected intgetNightMode()protected intgetNightModeCustomType()booleanisNightModeOn()Returns 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)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
-
enableCarMode
-
enableCarMode
-
disableCarMode
-
getNightMode
-
setNightMode
-
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)
-