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
-
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 PersistableBundle
Simply returns the bundle provided byShadowUwbManager#setSpecificationInfo()
, allowing the tester to dictate available features.protected CancellationSignal
openRangingSession
(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback) Instantiates aShadowRangingSession
with the adapter provided byShadowUwbManager#setUwbAdapter()
, allowing the tester dictate the results of ranging attempts.protected CancellationSignal
openRangingSession
(PersistableBundle params, Executor executor, android.uwb.RangingSession.Callback callback, String chipId) Instantiates aShadowRangingSession
with the multi-chip API call.void
setChipInfos
(List<PersistableBundle> chipInfos) Sets the list of bundles to be returned byUwbManager.getChipInfos()
.void
setSpecificationInfo
(PersistableBundle specificationInfo) Sets the bundle to be returned byUwbManager.getSpecificationInfo()
.void
Sets the UWB adapter to use for newShadowRangingSession
s.
-
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 aShadowRangingSession
with the adapter provided byShadowUwbManager#setUwbAdapter()
, allowing the tester dictate the results of ranging attempts. -
setUwbAdapter
Sets the UWB adapter to use for newShadowRangingSession
s. -
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 aShadowRangingSession
with the multi-chip API call.chipId
is 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()
.
-