Class ShadowUIModeManager

java.lang.Object
org.robolectric.shadows.ShadowUIModeManager

@Implements(android.app.UiModeManager.class) public class ShadowUIModeManager extends Object
Shadow for UiModeManager.
  • 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)
    • getApplicationNightMode

      public int getApplicationNightMode()
    • getActiveProjectionTypes

      public Set<Integer> 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)