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
-
Method Summary
Modifier and TypeMethodDescriptionandroid.safetycenter.SafetyEvent
getLastSafetyEvent
(String safetySourceId) Returns theSafetyEvent
that was given toSafetyCenterManager
the last timesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)
was called with thissafetySourceId
.android.safetycenter.SafetySourceErrorDetails
getLastSafetySourceError
(String safetySourceId) Returns theSafetySourceErrorDetails
that was given toSafetyCenterManager
the last timereportSafetySourceError(java.lang.String, android.safetycenter.SafetySourceErrorDetails)
was called with thissafetySourceId
.protected android.safetycenter.SafetySourceData
getSafetySourceData
(String safetySourceId) protected boolean
protected void
reportSafetySourceError
(String safetySourceId, android.safetycenter.SafetySourceErrorDetails safetySourceErrorDetails) static void
reset()
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.protected void
setSafetySourceData
(String safetySourceId, android.safetycenter.SafetySourceData safetySourceData, android.safetycenter.SafetyEvent safetyEvent) void
throwOnSafetySourceId
(String safetySourceId) Makes the APIs throw anIllegalArgumentException
for the givensafetySourceId
.
-
Constructor Details
-
ShadowSafetyCenterManager
public ShadowSafetyCenterManager()
-
-
Method Details
-
isSafetyCenterEnabled
-
setSafetySourceData
@Implementation protected void setSafetySourceData(String safetySourceId, android.safetycenter.SafetySourceData safetySourceData, android.safetycenter.SafetyEvent safetyEvent) -
getSafetySourceData
@Implementation protected android.safetycenter.SafetySourceData getSafetySourceData(String safetySourceId) -
reportSafetySourceError
@Implementation protected void reportSafetySourceError(String safetySourceId, 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. -
throwOnSafetySourceId
Makes the APIs throw anIllegalArgumentException
for the givensafetySourceId
. -
getLastSafetyEvent
Returns theSafetyEvent
that was given toSafetyCenterManager
the last timesetSafetySourceData(java.lang.String, android.safetycenter.SafetySourceData, android.safetycenter.SafetyEvent)
was called with thissafetySourceId
. -
getLastSafetySourceError
public android.safetycenter.SafetySourceErrorDetails getLastSafetySourceError(String safetySourceId) Returns theSafetySourceErrorDetails
that was given toSafetyCenterManager
the last timereportSafetySourceError(java.lang.String, android.safetycenter.SafetySourceErrorDetails)
was called with thissafetySourceId
. -
reset
-