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
@Implementation protected int getCurrentModeType() -
setCurrentModeType
public void setCurrentModeType(int modeType) -
enableCarMode
@Implementation(maxSdk=29) protected void enableCarMode(int flags) -
enableCarMode
@Implementation(minSdk=30) protected void enableCarMode(int priority, int flags) -
disableCarMode
@Implementation protected void disableCarMode(int flags) -
getNightMode
@Implementation protected int getNightMode() -
setNightMode
@Implementation protected void setNightMode(int mode) -
getProjectingPackages
-
getApplicationNightMode
public int getApplicationNightMode() -
getActiveProjectionTypes
-
setFailOnProjectionToggle
public void setFailOnProjectionToggle(boolean failOnProjectionToggle) -
setApplicationNightMode
@Implementation(minSdk=31) @HiddenApi protected void setApplicationNightMode(int mode) -
requestProjection
@Implementation(minSdk=31) protected boolean requestProjection(int projectionType) -
releaseProjection
@Implementation(minSdk=31) protected boolean releaseProjection(int projectionType) -
getNightModeCustomType
@Implementation(minSdk=33) protected int getNightModeCustomType() -
isNightModeOn
public boolean isNightModeOn()Returns whether night mode is currently on when a custom night mode type is selected. -
setNightModeCustomType
@Implementation(minSdk=33) protected void setNightModeCustomType(int mode) -
setNightModeActivatedForCustomMode
@Implementation(minSdk=33) protected boolean setNightModeActivatedForCustomMode(int mode, boolean active)
-