Package org.robolectric.shadows
Class ShadowSatelliteManager
java.lang.Object
org.robolectric.shadows.ShadowSatelliteManager
@Implements(value=android.telephony.satellite.SatelliteManager.class,
minSdk=35,
isInAndroidSdk=false)
public class ShadowSatelliteManager
extends Object
Shadow for
SatelliteManager system service.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttachRestrictionReasonsForCarrier(int carrierId) protected static com.android.internal.telephony.ITelephonyprotected intregisterForSupportedStateChanged(Executor executor, Consumer<Boolean> callback) protected voidrequestIsCommunicationAllowedForCurrentLocation(Executor executor, OutcomeReceiver<Boolean, SatelliteManager.SatelliteException> callback) protected voidrequestIsSupported(Executor executor, OutcomeReceiver<Boolean, SatelliteManager.SatelliteException> callback) protected voidrequestSatelliteSubscriberProvisionStatus(Executor executor, OutcomeReceiver<List<SatelliteSubscriberProvisionStatus>, SatelliteManager.SatelliteException> callback) static voidreset()voidsetAttachRestrictionReasonsForCarrier(int carrierId, Set<Integer> reasons) Test helper: set attach restriction reasons for a carrier.voidsetIsCommunicationAllowedForCurrentLocation(boolean newValue, SatelliteManager.SatelliteException error) voidsetIsSupportedResponse(boolean newValue, SatelliteManager.SatelliteException error) voidsetRegistrationSatelliteResult(int result) voidTest helper: set satellite data optimized apps list.voidsetSatelliteSubscriberProvisionStatus(List<SatelliteSubscriberProvisionStatus> status, SatelliteManager.SatelliteException error) Test helper: set the provision status that will be returned by requests.voidtriggerOnSupportedStateChanged(boolean isSupported) Triggers the callback for satellite supported state changes.voidtriggerSatelliteModemStateChange(int state) Updates the current state of the satellite modem, and notifies all listeners.protected voidunregisterForSupportedStateChanged(Consumer<Boolean> callback)
-
Constructor Details
-
ShadowSatelliteManager
public ShadowSatelliteManager()
-
-
Method Details
-
setSatelliteSubscriberProvisionStatus
public void setSatelliteSubscriberProvisionStatus(List<SatelliteSubscriberProvisionStatus> status, SatelliteManager.SatelliteException error) Test helper: set the provision status that will be returned by requests. -
setAttachRestrictionReasonsForCarrier
Test helper: set attach restriction reasons for a carrier. -
setSatelliteDataOptimizedApps
Test helper: set satellite data optimized apps list. -
triggerSatelliteModemStateChange
Updates the current state of the satellite modem, and notifies all listeners.- Throws:
RemoteException
-
setRegistrationSatelliteResult
public void setRegistrationSatelliteResult(int result) -
setIsSupportedResponse
Sets the result ofSatelliteManager.requestIsSupported(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean, android.telephony.satellite.SatelliteManager.SatelliteException>)calls.Accepts both the boolean result indicating whether satellite is supported or not, and an optional error which will be returned instead, when non-null.
-
requestIsSupported
@Implementation(minSdk=35) protected void requestIsSupported(Executor executor, OutcomeReceiver<Boolean, SatelliteManager.SatelliteException> callback) -
setIsCommunicationAllowedForCurrentLocation
public void setIsCommunicationAllowedForCurrentLocation(boolean newValue, SatelliteManager.SatelliteException error) Sets the result ofSatelliteManager.requestIsCommunicationAllowedForCurrentLocation(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean, android.telephony.satellite.SatelliteManager.SatelliteException>)calls.Accepts both the boolean result indicating whether satellite is allowed or not, and an optional error which will be returned instead, when non-null.
-
requestIsCommunicationAllowedForCurrentLocation
@Implementation(minSdk=35) protected void requestIsCommunicationAllowedForCurrentLocation(Executor executor, OutcomeReceiver<Boolean, SatelliteManager.SatelliteException> callback) -
getITelephony
-
registerForSupportedStateChanged
@Implementation(minSdk=36) @CanIgnoreReturnValue protected int registerForSupportedStateChanged(Executor executor, Consumer<Boolean> callback) -
unregisterForSupportedStateChanged
@Implementation(minSdk=36) protected void unregisterForSupportedStateChanged(Consumer<Boolean> callback) -
triggerOnSupportedStateChanged
public void triggerOnSupportedStateChanged(boolean isSupported) Triggers the callback for satellite supported state changes. -
requestSatelliteSubscriberProvisionStatus
@Implementation(minSdk=36) protected void requestSatelliteSubscriberProvisionStatus(Executor executor, OutcomeReceiver<List<SatelliteSubscriberProvisionStatus>, SatelliteManager.SatelliteException> callback) -
getAttachRestrictionReasonsForCarrier
@Implementation(minSdk=36) protected Set<Integer> getAttachRestrictionReasonsForCarrier(int carrierId) -
getSatelliteDataOptimizedApps
-
reset
-