Package org.robolectric.shadows
Class ShadowUwbManager
java.lang.Object
org.robolectric.shadows.ShadowUwbManager
@Implements(value=android.uwb.UwbManager.class,
minSdk=31,
isInAndroidSdk=false)
public class ShadowUwbManager
extends Object
Adds Robolectric support for UWB ranging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<PersistableBundle>Simply returns the List of bundles provided bysetChipInfos(List), allowing the tester to set multi-chip configuration.protected PersistableBundleSimply returns the bundle provided byShadowUwbManager#setSpecificationInfo(), allowing the tester to dictate available features.protected CancellationSignalopenRangingSession(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback) Instantiates aShadowRangingSessionwith the adapter provided byShadowUwbManager#setUwbAdapter(), allowing the tester dictate the results of ranging attempts.protected CancellationSignalopenRangingSession(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback, String chipId) Instantiates aShadowRangingSessionwith the multi-chip API call.voidsetChipInfos(List<PersistableBundle> chipInfos) Sets the list of bundles to be returned byUwbManager.getChipInfos().voidsetSpecificationInfo(PersistableBundle specificationInfo) Sets the bundle to be returned byUwbManager.getSpecificationInfo().voidSets the UWB adapter to use for newShadowRangingSessions.
-
Constructor Details
-
ShadowUwbManager
public ShadowUwbManager()
-
-
Method Details
-
getSpecificationInfo
Simply returns the bundle provided byShadowUwbManager#setSpecificationInfo(), allowing the tester to dictate available features. -
openRangingSession
@Implementation protected CancellationSignal openRangingSession(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback) Instantiates aShadowRangingSessionwith the adapter provided byShadowUwbManager#setUwbAdapter(), allowing the tester dictate the results of ranging attempts. -
setUwbAdapter
Sets the UWB adapter to use for newShadowRangingSessions. -
setSpecificationInfo
Sets the bundle to be returned byUwbManager.getSpecificationInfo(). -
openRangingSession
@Implementation(minSdk=33) protected CancellationSignal openRangingSession(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback, String chipId) Instantiates aShadowRangingSessionwith the multi-chip API call.chipIdis unused in the shadow implementation, so this is equivalent toopenRangingSession(PersistableBundle, Executor, RangingSession.Callback) -
getChipInfos
Simply returns the List of bundles provided bysetChipInfos(List), allowing the tester to set multi-chip configuration. -
setChipInfos
Sets the list of bundles to be returned byUwbManager.getChipInfos().
-