Home
last modified time | relevance | path

Searched refs:mUwbManager (Results 1 – 12 of 12) sorted by relevance

/packages/modules/Uwb/framework/tests/src/android/uwb/
DUwbManagerTest.java83 private UwbManager mUwbManager; field in UwbManagerTest
90 mUwbManager = new UwbManager(mContext, mIUwbAdapter); in setUp()
96 mUwbManager.registerAdapterStateCallback(EXECUTOR, mAdapterStateCallback); in testRegisterUnregisterCallbacks()
98 mUwbManager.registerAdapterStateCallback(EXECUTOR, mAdapterStateCallback2); in testRegisterUnregisterCallbacks()
100 mUwbManager.unregisterAdapterStateCallback(mAdapterStateCallback); in testRegisterUnregisterCallbacks()
102 mUwbManager.unregisterAdapterStateCallback(mAdapterStateCallback2); in testRegisterUnregisterCallbacks()
106 mUwbManager.registerUwbVendorUciCallback(EXECUTOR, mUwbVendorUciCallback); in testRegisterUnregisterCallbacks()
108 mUwbManager.registerUwbVendorUciCallback(EXECUTOR, mUwbVendorUciCallback2); in testRegisterUnregisterCallbacks()
110 mUwbManager.unregisterUwbVendorUciCallback(mUwbVendorUciCallback); in testRegisterUnregisterCallbacks()
112 mUwbManager.unregisterUwbVendorUciCallback(mUwbVendorUciCallback2); in testRegisterUnregisterCallbacks()
[all …]
/packages/modules/Uwb/tests/cts/tests/src/android/uwb/cts/
DUwbManagerTest.java112 private UwbManager mUwbManager; field in UwbManagerTest
123 mUwbManager = mContext.getSystemService(UwbManager.class); in setup()
125 assertThat(mUwbManager).isNotNull(); in setup()
132 if (!mUwbManager.isUwbEnabled()) { in setup()
135 if (com.android.uwb.flags.Flags.hwState() && mUwbManager.isUwbHwIdleTurnOffEnabled()) { in setup()
137 requestUwbHwEnabledAndWaitForCompletion(true, mUwbManager, true); in setup()
139 mDefaultChipId = mUwbManager.getDefaultChipId(); in setup()
152 if (com.android.uwb.flags.Flags.hwState() && mUwbManager.isUwbHwIdleTurnOffEnabled()) { in teardown()
154 requestUwbHwEnabledAndWaitForCompletion(false, mUwbManager, false); in teardown()
156 mDefaultChipId = mUwbManager.getDefaultChipId(); in teardown()
[all …]
DUwbFrameworkInitializerTest.java45 private UwbManager mUwbManager; field in UwbFrameworkInitializerTest
49 mUwbManager = mContext.getSystemService(UwbManager.class); in setup()
51 assertThat(mUwbManager).isNotNull(); in setup()
/packages/apps/Settings/tests/robotests/src/com/android/settings/uwb/
DUwbPreferenceControllerTest.java83 private UwbManager mUwbManager; field in UwbPreferenceControllerTest
106 when(mContext.getSystemService(UwbManager.class)).thenReturn(mUwbManager); in setUp()
109 doReturn(STATE_ENABLED_ACTIVE).when(mUwbManager).getAdapterState(); in setUp()
119 verify(mUwbManager).registerAdapterStateCallback( in startControllerAndCaptureCallbacks()
146 verify(mUwbManager, never()).registerAdapterStateCallback(any(), any()); in getAvailabilityStatus_uwbNotShown_shouldReturnUnsupported()
153 doReturn(STATE_ENABLED_ACTIVE).when(mUwbManager).getAdapterState(); in isChecked_uwbEnabled_shouldReturnTrue()
161 doReturn(STATE_DISABLED).when(mUwbManager).getAdapterState(); in isChecked_uwbDisabled_shouldReturnFalse()
169 clearInvocations(mUwbManager); in setChecked_uwbDisabled_shouldEnableUwb()
174 verify(mUwbManager).setUwbEnabled(true); in setChecked_uwbDisabled_shouldEnableUwb()
175 verify(mUwbManager, never()).setUwbEnabled(false); in setChecked_uwbDisabled_shouldEnableUwb()
[all …]
/packages/apps/Settings/src/com/android/settings/uwb/
DUwbPreferenceController.java51 private final UwbManager mUwbManager; field in UwbPreferenceController
69 mUwbManager = context.getSystemService(UwbManager.class); in UwbPreferenceController()
82 mState = mUwbManager.getAdapterState(); in UwbPreferenceController()
84 mUwbManager = null; in UwbPreferenceController()
133 mUwbManager.setUwbEnabled(false); in setChecked()
135 mUwbManager.setUwbEnabled(isChecked); in setChecked()
145 mState = mUwbManager.getAdapterState(); in onStart()
148 mUwbManager.registerAdapterStateCallback(mExecutor, mAdapterStateCallback); in onStart()
159 mUwbManager.unregisterAdapterStateCallback(mAdapterStateCallback); in onStop()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DUwbTogglePreferenceController.java34 private final UwbManager mUwbManager; field in UwbTogglePreferenceController
39 mUwbManager = context.getSystemService(UwbManager.class); in UwbTogglePreferenceController()
57 preference.setChecked(mUwbManager != null ? mUwbManager.isUwbEnabled() : false); in updateState()
63 if (mUwbManager != null) { in handlePreferenceChanged()
64 mUwbManager.setUwbEnabled(settingsOn); in handlePreferenceChanged()
/packages/modules/Uwb/androidx_backend/src/androidx/core/uwb/backend/impl/internal/
DUwbServiceImpl.java66 private final UwbManager mUwbManager; field in UwbServiceImpl
101 mUwbManager = context.getSystemService(UwbManager.class); in UwbServiceImpl()
102 requireNonNull(mUwbManager); in UwbServiceImpl()
105 mAdapterState = mUwbManager.getAdapterState(); in UwbServiceImpl()
107 mUwbManager.registerAdapterStateCallback(mSerialExecutor, mAdapterStateCallback); in UwbServiceImpl()
109 mUwbManager = null; in UwbServiceImpl()
131 List<PersistableBundle> chipInfoBundles = mUwbManager.getChipInfos(); in getChipInfos()
141 return mUwbManager.getDefaultChipId(); in getDefaultChipId()
150 if (mUwbManager != null) { in shutdown()
151 mUwbManager.unregisterAdapterStateCallback(mAdapterStateCallback); in shutdown()
[all …]
DRangingDevice.java66 protected final UwbManager mUwbManager; field in RangingDevice
110 mUwbManager = manager; in RangingDevice()
141 String defaultChipId = mUwbManager.getDefaultChipId(); in getLocalAddress()
273 List<PersistableBundle> chipInfoBundles = mUwbManager.getChipInfos(); in initializeUwbAddress()
472 mUwbManager.openRangingSession(
478 mUwbManager.openRangingSession(
/packages/modules/Connectivity/remoteauth/tests/unit/src/com/android/server/remoteauth/ranging/
DRangingManagerTest.java108 @Mock private UwbManager mUwbManager; field in RangingManagerTest
116 when(mContext.getSystemService(UwbManager.class)).thenReturn(mUwbManager); in setUp()
119 when(mUwbManager.getAdapterState()).thenReturn(STATE_ENABLED_INACTIVE); in setUp()
120 when(mUwbManager.getSpecificationInfo()).thenReturn(TEST_GENERIC_SPEC.toBundle()); in setUp()
126 verifyZeroInteractions(mUwbManager); in testConstruction()
135 verify(mUwbManager).getAdapterState(); in testConstruction_withUwbEnabled()
136 verify(mUwbManager).registerAdapterStateCallback(any(), any()); in testConstruction_withUwbEnabled()
146 verify(mUwbManager).registerAdapterStateCallback(any(), any()); in testShutdown_withUwbEnabled()
147 verify(mUwbManager).unregisterAdapterStateCallback(any()); in testShutdown_withUwbEnabled()
172 verify(mUwbManager, times(1)).getSpecificationInfo(); in testGetRangingCapabilities_withUwbEnabled()
[all …]
/packages/modules/Uwb/androidx_backend/tests/src/androidx/core/uwb/backend/impl/internal/
DRangingControleeTest.java67 private UwbManager mUwbManager; field in RangingControleeTest
105 new RangingControlee(mUwbManager, getExecutor(), mOpAsyncCallbackRunner,
153 verify(mUwbManager).openRangingSession(mBundleArgumentCaptor.capture(), any(), any());
181 .when(mUwbManager)
198 verify(mUwbManager).openRangingSession(any(), any(), any());
218 .when(mUwbManager)
246 .when(mUwbManager)
264 verify(mUwbManager).openRangingSession(any(), any(), any());
285 .when(mUwbManager)
343 .when(mUwbManager)
DRangingControllerTest.java68 private UwbManager mUwbManager; field in RangingControllerTest
129 new RangingController(mUwbManager, getExecutor(), mOpAsyncCallbackRunner,
183 verify(mUwbManager).openRangingSession(mBundleArgumentCaptor.capture(), any(), any());
210 .when(mUwbManager)
227 verify(mUwbManager).openRangingSession(any(), any(), any());
248 .when(mUwbManager)
277 .when(mUwbManager)
295 verify(mUwbManager).openRangingSession(any(), any(), any());
318 .when(mUwbManager)
378 .when(mUwbManager)
[all …]
/packages/modules/Uwb/tests/cts/hostsidetests/multidevices/uwb/snippet/
DUwbManagerSnippet.java73 private final UwbManager mUwbManager; field in UwbManagerSnippet
85 mUwbManager = mContext.getSystemService(UwbManager.class); in UwbManagerSnippet()
411 mUwbManager.registerAdapterStateCallback(mExecutor, uwbAdapterStateCallback); in registerUwbAdapterStateCallback()
418 mUwbManager.unregisterAdapterStateCallback(uwbAdapterStateCallback); in unregisterUwbAdapterStateCallback()
425 return mUwbManager.getAdapterState(); in getAdapterState()
431 return mUwbManager.isUwbEnabled(); in isUwbEnabled()
437 mUwbManager.setUwbEnabled(enabled); in setUwbEnabled()
443 return mUwbManager.isUwbHwEnableRequested(); in isUwbHwEnableRequested()
449 mUwbManager.requestUwbHwEnabled(enabled); in requestUwbHwEnabled()
455 return mUwbManager.isUwbHwIdleTurnOffEnabled(); in isUwbHwIdleTurnOffEnabled()
[all …]