Class ShadowUwbManager


  • @Implements(value=android.uwb.UwbManager.class,
                minSdk=31,
                isInAndroidSdk=false)
    public class ShadowUwbManager
    extends Object
    Adds Robolectric support for UWB ranging.
    • Constructor Detail

      • ShadowUwbManager

        public ShadowUwbManager()
    • Method Detail

      • getSpecificationInfo

        @Implementation
        protected PersistableBundle getSpecificationInfo()
        Simply returns the bundle provided by ShadowUwbManager#setSpecificationInfo(), allowing the tester to dictate available features.
      • openRangingSession

        @Implementation
        protected CancellationSignal openRangingSession​(PersistableBundle params,
                                                        Executor executor,
                                                        android.uwb.RangingSession.Callback callback)
        Instantiates a ShadowRangingSession with the adapter provided by ShadowUwbManager#setUwbAdapter(), allowing the tester dictate the results of ranging attempts.
      • setSpecificationInfo

        public void setSpecificationInfo​(PersistableBundle specificationInfo)
        Sets the bundle to be returned by UwbManager.getSpecificationInfo().