Package org.robolectric.shadows
Class ShadowUwbAdapterStateListener
java.lang.Object
org.robolectric.shadows.ShadowUwbAdapterStateListener
@Implements(value=android.uwb.AdapterStateListener.class, minSdk=31, isInAndroidSdk=false) public class ShadowUwbAdapterStateListener extends Object
Adds Robolectric support for UWB adapter state listener methods.
-
Constructor Summary
Constructors Constructor Description ShadowUwbAdapterStateListener()
-
Method Summary
Modifier and Type Method Description protected int
getAdapterState()
Gets the adapter state set viasetEnabled(boolean)
protected void
onAdapterStateChanged(int state, int reason)
Sets a local variable that stores the adapter state, and invokes any callbacks that were registered viaregister(Executor, AdapterStateCallback)
protected void
register(Executor executor, android.uwb.UwbManager.AdapterStateCallback callback)
Registers a callback which is invoked whenonAdapterStateChanged(int, int)
is called.protected void
setEnabled(boolean isEnabled)
Sets a local variable that stores the adapter state, which can be retrieved withgetAdapterState()
.protected void
unregister(android.uwb.UwbManager.AdapterStateCallback callback)
Unregisters a callback.
-
Constructor Details
-
ShadowUwbAdapterStateListener
public ShadowUwbAdapterStateListener()
-
-
Method Details
-
getAdapterState
Gets the adapter state set viasetEnabled(boolean)
-
setEnabled
Sets a local variable that stores the adapter state, which can be retrieved withgetAdapterState()
. -
onAdapterStateChanged
Sets a local variable that stores the adapter state, and invokes any callbacks that were registered viaregister(Executor, AdapterStateCallback)
-
register
@Implementation protected void register(Executor executor, android.uwb.UwbManager.AdapterStateCallback callback)Registers a callback which is invoked whenonAdapterStateChanged(int, int)
is called. -
unregister
Unregisters a callback.
-