Class ShadowTimeManager

java.lang.Object
org.robolectric.shadows.ShadowTimeManager

@Implements(value=android.app.time.TimeManager.class, minSdk=31, isInAndroidSdk=false) public class ShadowTimeManager extends Object
Shadow for internal Android TimeManager class introduced in S.
  • Field Details

  • Constructor Details

    • ShadowTimeManager

      public ShadowTimeManager()
  • Method Details

    • setCapabilityState

      public void setCapabilityState(String capability, int value)
      Capabilites are predefined and not controlled by user, so they can't be changed via TimeManager API.
    • getTimeZoneCapabilitiesAndConfig

      @Implementation protected android.app.time.TimeZoneCapabilitiesAndConfig getTimeZoneCapabilitiesAndConfig() throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • updateTimeZoneConfiguration

      @Implementation protected boolean updateTimeZoneConfiguration(android.app.time.TimeZoneConfiguration configuration)
    • addTimeZoneDetectorListener

      @Implementation protected void addTimeZoneDetectorListener(Executor executor, android.app.time.TimeManager.TimeZoneDetectorListener listener)
    • removeTimeZoneDetectorListener

      @Implementation protected void removeTimeZoneDetectorListener(android.app.time.TimeManager.TimeZoneDetectorListener listener)
    • suggestExternalTime

      @Implementation protected void suggestExternalTime(android.app.time.ExternalTimeSuggestion timeSuggestion)