Package org.robolectric.shadows
Class ShadowSafetyCenterManager
java.lang.Object
org.robolectric.shadows.ShadowSafetyCenterManager
@Implements(value=android.safetycenter.SafetyCenterManager.class, minSdk=33, isInAndroidSdk=false) public class ShadowSafetyCenterManager extends Object
Shadow for
SafetyCenterManager.-
Constructor Summary
Constructors Constructor Description ShadowSafetyCenterManager() -
Method Summary
Modifier and Type Method Description android.safetycenter.SafetyEventgetLastSafetyEvent(String safetySourceId)Returns theSafetyEventthat was given toSafetyCenterManagerthe last timesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)was called with thissafetySourceId.android.safetycenter.SafetySourceErrorDetailsgetLastSafetySourceError(String safetySourceId)Returns theSafetySourceErrorDetailsthat was given toSafetyCenterManagerthe last timereportSafetySourceError(java.lang.String, android.safetycenter.SafetySourceErrorDetails)was called with thissafetySourceId.protected android.safetycenter.SafetySourceDatagetSafetySourceData(String safetySourceId)protected booleanisSafetyCenterEnabled()protected voidreportSafetySourceError(String safetySourceId, android.safetycenter.SafetySourceErrorDetails safetySourceErrorDetails)voidsetSafetyCenterEnabled(boolean enabled)Sets the return value forisSafetyCenterEnabled()which also enables thesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)andgetSafetySourceData(java.lang.String)methods.protected voidsetSafetySourceData(String safetySourceId, android.safetycenter.SafetySourceData safetySourceData, android.safetycenter.SafetyEvent safetyEvent)
-
Constructor Details
-
ShadowSafetyCenterManager
public ShadowSafetyCenterManager()
-
-
Method Details
-
isSafetyCenterEnabled
-
setSafetySourceData
@Implementation protected void setSafetySourceData(@NonNull String safetySourceId, @Nullable android.safetycenter.SafetySourceData safetySourceData, @NonNull android.safetycenter.SafetyEvent safetyEvent) -
getSafetySourceData
@Implementation protected android.safetycenter.SafetySourceData getSafetySourceData(@NonNull String safetySourceId) -
reportSafetySourceError
@Implementation protected void reportSafetySourceError(@NonNull String safetySourceId, @NonNull android.safetycenter.SafetySourceErrorDetails safetySourceErrorDetails) -
setSafetyCenterEnabled
public void setSafetyCenterEnabled(boolean enabled)Sets the return value forisSafetyCenterEnabled()which also enables thesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)andgetSafetySourceData(java.lang.String)methods. -
getLastSafetyEvent
Returns theSafetyEventthat was given toSafetyCenterManagerthe last timesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)was called with thissafetySourceId. -
getLastSafetySourceError
public android.safetycenter.SafetySourceErrorDetails getLastSafetySourceError(@NonNull String safetySourceId)Returns theSafetySourceErrorDetailsthat was given toSafetyCenterManagerthe last timereportSafetySourceError(java.lang.String, android.safetycenter.SafetySourceErrorDetails)was called with thissafetySourceId.
-