Package org.robolectric.shadows
Class ShadowSettings
java.lang.Object
org.robolectric.shadows.ShadowSettings
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classShadow forSettings.Config.static classstatic classstatic class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static booleancanDrawOverlays(Context context) static voidreset()static voidset24HourTimeFormat(boolean use24HourTimeFormat) Sets the value of theSettings.System.TIME_12_24setting.static voidsetAdbEnabled(boolean adbEnabled) Sets the value of theSettings.Global.ADB_ENABLEDsetting orSettings.Secure.ADB_ENABLEDdepending on API level.static voidsetAirplaneMode(boolean isAirplaneMode) Sets the value of theSettings.System.AIRPLANE_MODE_ONsetting.static voidsetCanDrawOverlays(boolean canDrawOverlays) Sets the value returned bycanDrawOverlays(Context).static voidsetInstallNonMarketApps(boolean installNonMarketApps) Sets the value of theSettings.Global.INSTALL_NON_MARKET_APPSsetting orSettings.Secure.INSTALL_NON_MARKET_APPSdepending on API level.static voidsetLockScreenAllowPrivateNotifications(boolean lockScreenAllowPrivateNotifications) static voidsetLockScreenShowNotifications(boolean lockScreenShowNotifications) static voidsetWifiOn(boolean isOn) Non-Android accessor that allows the value of the WIFI_ON setting to be set.
- 
Constructor Details- 
ShadowSettingspublic ShadowSettings()
 
- 
- 
Method Details- 
setAirplaneModepublic static void setAirplaneMode(boolean isAirplaneMode) Sets the value of theSettings.System.AIRPLANE_MODE_ONsetting.- Parameters:
- isAirplaneMode- new status for airplane mode
 
- 
setWifiOnpublic static void setWifiOn(boolean isOn) Non-Android accessor that allows the value of the WIFI_ON setting to be set.- Parameters:
- isOn- new status for wifi mode
 
- 
set24HourTimeFormatpublic static void set24HourTimeFormat(boolean use24HourTimeFormat) Sets the value of theSettings.System.TIME_12_24setting.- Parameters:
- use24HourTimeFormat- new status for the time setting
 
- 
canDrawOverlays- Returns:
- false by default, or the value specified via setCanDrawOverlays(boolean)
 
- 
setCanDrawOverlayspublic static void setCanDrawOverlays(boolean canDrawOverlays) Sets the value returned bycanDrawOverlays(Context).
- 
setAdbEnabledpublic static void setAdbEnabled(boolean adbEnabled) Sets the value of theSettings.Global.ADB_ENABLEDsetting orSettings.Secure.ADB_ENABLEDdepending on API level.- Parameters:
- adbEnabled- new value for whether adb is enabled
 
- 
setInstallNonMarketAppspublic static void setInstallNonMarketApps(boolean installNonMarketApps) Sets the value of theSettings.Global.INSTALL_NON_MARKET_APPSsetting orSettings.Secure.INSTALL_NON_MARKET_APPSdepending on API level.- Parameters:
- installNonMarketApps- new value for whether non-market apps are allowed to be installed
 
- 
setLockScreenShowNotificationspublic static void setLockScreenShowNotifications(boolean lockScreenShowNotifications) 
- 
setLockScreenAllowPrivateNotificationspublic static void setLockScreenAllowPrivateNotifications(boolean lockScreenAllowPrivateNotifications) 
- 
reset
 
-