Home
last modified time | relevance | path

Searched refs:mBroadcast (Results 1 – 25 of 31) sorted by relevance

12

/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/
DAudioSharingCompatibilityPreferenceControllerTest.java96 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingCompatibilityPreferenceControllerTest
122 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
125 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
142 verify(mBroadcast) in onStart_flagOn_registerCallback()
151 when(mBroadcast.isProfileReady()).thenReturn(false); in onStart_flagOnProfileNotReady_registerProfileCallback()
153 verify(mBroadcast, never()) in onStart_flagOnProfileNotReady_registerProfileCallback()
163 verify(mBroadcast, never()) in onStart_flagOff_doNothing()
173 verify(mBroadcast).unregisterServiceCallBack(any(BluetoothLeBroadcast.Callback.class)); in onStop_flagOn_unregisterCallback()
182 verify(mBroadcast, never()) in onStop_flagOff_doNothing()
190 when(mBroadcast.isEnabled(null)).thenReturn(false); in onServiceConnected_updateSwitch()
[all …]
DAudioSharingSwitchBarControllerTest.java125 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingSwitchBarControllerTest
168 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
172 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
174 .when(mBroadcast) in setUp()
178 .when(mBroadcast) in setUp()
229 when(mBroadcast.isEnabled(null)).thenReturn(false); in bluetoothOff_switchDisabled()
244 when(mBroadcast.isEnabled(null)).thenReturn(true); in onServiceConnected_switchEnabled()
273 verify(mBroadcast, never()) in onStart_flagOff_doNothing()
285 when(mBroadcast.isEnabled(null)).thenReturn(false); in onStart_flagOnProfileNotReady_registerProfileCallback()
286 when(mBroadcast.isProfileReady()).thenReturn(false); in onStart_flagOnProfileNotReady_registerProfileCallback()
[all …]
DAudioSharingPreferenceControllerTest.java90 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingPreferenceControllerTest
112 when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
129 verify(mBroadcast).registerServiceCallBack(any(), any(BluetoothLeBroadcast.Callback.class)); in onStart_flagOn_registerCallback()
137 verify(mBroadcast, never()) in onStart_flagOff_skipRegisterCallback()
146 verify(mBroadcast).unregisterServiceCallBack(any(BluetoothLeBroadcast.Callback.class)); in onStop_flagOn_unregisterCallback()
154 verify(mBroadcast, never()) in onStop_flagOff_skipUnregisterCallback()
172 when(mBroadcast.isEnabled(any())).thenReturn(true); in getSummary_broadcastOn()
179 when(mBroadcast.isEnabled(any())).thenReturn(false); in getSummary_broadcastOff()
187 when(mBroadcast.isEnabled(any())).thenReturn(true); in onBluetoothStateChanged_refreshSummary()
193 when(mBroadcast.isEnabled(any())).thenReturn(false); in onBluetoothStateChanged_refreshSummary()
[all …]
DAudioSharingCallAudioPreferenceControllerTest.java125 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingCallAudioPreferenceControllerTest
169 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
172 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
269 when(mBroadcast.isEnabled(any())).thenReturn(true); in updateVisibility_flagOff_invisible()
279 when(mBroadcast.isEnabled(any())).thenReturn(false); in updateVisibility_broadcastOffBluetoothOff_invisible()
290 when(mBroadcast.isEnabled(any())).thenReturn(true); in updateVisibility_broadcastOnBluetoothOff_invisible()
301 when(mBroadcast.isEnabled(any())).thenReturn(false); in updateVisibility_broadcastOffBluetoothOn_invisible()
311 when(mBroadcast.isEnabled(any())).thenReturn(true); in updateVisibility_broadcastOnBluetoothOn_visible()
321 when(mBroadcast.isEnabled(any())).thenReturn(true); in onProfileConnectionStateChanged_noDeviceInSharing_updateSummary()
342 when(mBroadcast.isEnabled(any())).thenReturn(true); in onFallbackDeviceChanged_updateSummary()
[all …]
DStreamSettingsCategoryControllerTest.java85 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in StreamSettingsCategoryControllerTest
110 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
113 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
178 when(mBroadcast.isProfileReady()).thenReturn(false); in onStart_flagOnProfileNotReady_registerProfileManagerCallback()
225 when(mBroadcast.isProfileReady()).thenReturn(false); in displayPreference_BluetoothOnProfileNotReady_preferenceInvisible()
243 when(mBroadcast.isProfileReady()).thenReturn(false); in onServiceConnected_updateVisibility()
248 when(mBroadcast.isProfileReady()).thenReturn(true); in onServiceConnected_updateVisibility()
DAudioSharingReceiverTest.java85 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingReceiverTest
103 when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
198 verifyNoInteractions(mBroadcast); in broadcastReceiver_receiveAudioSharingStopIntentFlagOff_doNothing()
205 when(mBroadcast.getLatestBroadcastId()).thenReturn(broadcastId); in broadcastReceiver_receiveAudioSharingStopIntent_stopBroadcast()
212 verify(mBroadcast, times(1)).stopBroadcast(broadcastId); in broadcastReceiver_receiveAudioSharingStopIntent_stopBroadcast()
DAudioSharingJoinDialogFragmentTest.java101 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingJoinDialogFragmentTest
123 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
137 when(mBroadcast.isEnabled(null)).thenReturn(false); in getMetricsCategory_notInSharing_correctValue()
146 when(mBroadcast.isEnabled(null)).thenReturn(true); in getMetricsCategory_inSharing_correctValue()
DAudioSharingDeviceVolumeGroupControllerTest.java121 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingDeviceVolumeGroupControllerTest
157 when(mProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
160 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
387 when(mBroadcast.isEnabled(null)).thenReturn(true); in updateVisibility_flagOff_setVisibleToFalse()
402 when(mBroadcast.isEnabled(null)).thenReturn(false); in updateVisibility_notEmptyPreferenceGroup_noSharing_setVisibleToFalse()
417 when(mBroadcast.isEnabled(null)).thenReturn(true); in updateVisibility_notEmptyPreferenceGroup_isSharing_setVisibleToTrue()
DAudioSharingDialogHandlerTest.java109 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingDialogHandlerTest
148 when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setup()
290 verify(mBroadcast).startPrivateBroadcast(); in handleUserTriggeredLeaDeviceConnected_noSharingTwoLeaDevices_showJoinDialog()
489 verify(mBroadcast).startPrivateBroadcast(); in handleLeaDeviceConnected_noSharingTwoLeaDevices_showJoinDialog()
670 verify(mBroadcast) in registerCallbacks()
677 verify(mBroadcast).unregisterServiceCallBack(any(BluetoothLeBroadcast.Callback.class)); in unregisterCallbacks()
729 when(mBroadcast.isEnabled(any())).thenReturn(isBroadcasting); in setUpBroadcast()
731 when(mBroadcast.getLatestBluetoothLeBroadcastMetadata()).thenReturn(mMetadata); in setUpBroadcast()
DAudioSharingDeviceVolumeControlUpdaterTest.java98 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingDeviceVolumeControlUpdaterTest
117 when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
149 when(mBroadcast.isEnabled(null)).thenReturn(false); in onProfileConnectionStateChanged_leaDeviceConnected_noSharing_removesPref()
363 when(mBroadcast.isEnabled(null)).thenReturn(true); in setupPreferenceMapWithDevice()
/packages/apps/Settings/src/com/android/settings/connecteddevice/audiosharing/
DAudioSharingCompatibilityPreferenceController.java56 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingCompatibilityPreferenceController
114 mBroadcast = mProfileManager == null ? null : mProfileManager.getLeAudioBroadcastProfile(); in AudioSharingCompatibilityPreferenceController()
144 if (mBroadcast == null || !AudioSharingUtils.isAudioSharingProfileReady(mProfileManager)) { in onStop()
150 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in onStop()
174 return mBroadcast != null && mBroadcast.getImproveCompatibility(); in isChecked()
179 if (mBroadcast == null || mBroadcast.getImproveCompatibility() == isChecked) { in setChecked()
180 if (mBroadcast != null) { in setChecked()
185 mBroadcast.setImproveCompatibility(isChecked); in setChecked()
227 if (mBroadcast == null) { in registerCallbacks()
233 mBroadcast.registerServiceCallBack(mExecutor, mBroadcastCallback); in registerCallbacks()
DAudioSharingNamePreferenceController.java118 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingNamePreferenceController
130 mBroadcast = in AudioSharingNamePreferenceController()
162 if (mBroadcast == null || !AudioSharingUtils.isAudioSharingProfileReady(mProfileManager)) { in onStop()
168 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in onStop()
222 if (mBroadcast != null) { in onPreferenceChange()
224 mBroadcast.setBroadcastName((String) newValue); in onPreferenceChange()
227 mBroadcast.setProgramInfo((String) newValue); in onPreferenceChange()
229 mBroadcast.updateBroadcast(); in onPreferenceChange()
242 if (mBroadcast == null) { in registerCallbacks()
248 mBroadcast.registerServiceCallBack(mExecutor, mBroadcastCallback); in registerCallbacks()
[all …]
DAudioSharingPasswordPreferenceController.java51 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingPasswordPreferenceController
59 mBroadcast = in AudioSharingPasswordPreferenceController()
97 if (mPreference == null || mBroadcast == null) { in onBindDialogView()
101 var password = mBroadcast.getBroadcastCode(); in onBindDialogView()
110 if (mBroadcast == null || isBroadcasting(mBtManager)) { in onPreferenceDataChanged()
118 isPublicBroadcast(mBroadcast.getBroadcastCode()); in onPreferenceDataChanged()
126 mBroadcast.setBroadcastCode( in onPreferenceDataChanged()
137 if (mBroadcast == null || mPreference == null) { in updatePreference()
143 byte[] password = mBroadcast.getBroadcastCode(); in updatePreference()
DAudioSharingDialogHandler.java60 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingDialogHandler
149 mBroadcast = in AudioSharingDialogHandler()
162 if (mBroadcast != null) { in registerCallbacks()
163 mBroadcast.registerServiceCallBack(executor, mBroadcastCallback); in registerCallbacks()
169 if (mBroadcast != null) { in unregisterCallbacks()
170 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in unregisterCallbacks()
257 if (mAssistant != null && mBroadcast != null) { in handleLeAudioDeviceConnected()
260 mBroadcast.getLatestBluetoothLeBroadcastMetadata(), in handleLeAudioDeviceConnected()
356 if (mBroadcast != null) { in handleLeAudioDeviceConnected()
357 mBroadcast.startPrivateBroadcast(); in handleLeAudioDeviceConnected()
[all …]
DAudioSharingPreferenceController.java50 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingPreferenceController
94 mBroadcast = in AudioSharingPreferenceController()
107 if (mEventManager == null || mBroadcast == null) { in onStart()
112 mBroadcast.registerServiceCallBack(mExecutor, mBroadcastCallback); in onStart()
121 if (mEventManager == null || mBroadcast == null) { in onStop()
126 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in onStop()
DAudioSharingSwitchBarController.java97 @Nullable private final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingSwitchBarController
277 mBroadcast = mProfileManager == null ? null : mProfileManager.getLeAudioBroadcastProfile(); in AudioSharingSwitchBarController()
324 if (mAssistant == null || mBroadcast == null || isBroadcasting) { in onCheckedChanged()
404 if (mBroadcast == null || mAssistant == null) { in registerCallbacks()
411 mBroadcast.registerServiceCallBack(mExecutor, mBroadcastCallback); in registerCallbacks()
422 if (mBroadcast == null || mAssistant == null) { in unregisterCallbacks()
429 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in unregisterCallbacks()
455 if (mBroadcast != null) { in startAudioSharing()
456 mBroadcast.startPrivateBroadcast(); in startAudioSharing()
467 if (mBroadcast != null) { in stopAudioSharing()
[all …]
DAudioSharingBasePreferenceController.java44 @Nullable protected final LocalBluetoothLeBroadcast mBroadcast; field in AudioSharingBasePreferenceController
52 mBroadcast = mProfileManager == null ? null : mProfileManager.getLeAudioBroadcastProfile(); in AudioSharingBasePreferenceController()
121 return mBroadcast != null && mBroadcast.isEnabled(null); in isBroadcasting()
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpAckPacket.java36 mBroadcast = broadcast; in DhcpAckPacket()
62 Inet4Address destIp = mBroadcast ? INADDR_BROADCAST : mYourIp; in buildPacket()
63 Inet4Address srcIp = mBroadcast ? INADDR_ANY : mSrcIp; in buildPacket()
66 DHCP_BOOTREPLY, mBroadcast); in buildPacket()
DDhcpOfferPacket.java63 Inet4Address destIp = mBroadcast ? INADDR_BROADCAST : mYourIp; in buildPacket()
64 Inet4Address srcIp = mBroadcast ? INADDR_ANY : mSrcIp; in buildPacket()
67 DHCP_BOOTREPLY, mBroadcast); in buildPacket()
DDhcpDiscoverPacket.java44 (mBroadcast ? "broadcast " : "unicast "); in toString()
53 mBroadcast); in buildPacket()
DDhcpReleasePacket.java45 result, DHCP_BOOTREPLY, mBroadcast); in buildPacket()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/
DAudioStreamsQrCodeFragmentTest.java74 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioStreamsQrCodeFragmentTest
84 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
85 when(mBroadcast.getAllBroadcastMetadata()).thenReturn(emptyList()); in setUp()
103 when(mBroadcast.getAllBroadcastMetadata()).thenReturn(list); in onCreateView_noMetadata_noQrCode()
123 when(mBroadcast.getAllBroadcastMetadata()).thenReturn(list); in onCreateView_hasMetadata_hasQrCode()
DAudioStreamsCategoryControllerTest.java84 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AudioStreamsCategoryControllerTest
113 when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUp()
116 when(mBroadcast.isProfileReady()).thenReturn(true); in setUp()
204 when(mBroadcast.isEnabled(any())).thenReturn(true); in updateVisibility_isBroadcasting_invisible()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/
DAvailableMediaDeviceGroupControllerTest.java123 @Mock private LocalBluetoothLeBroadcast mBroadcast; field in AvailableMediaDeviceGroupControllerTest
231 verify(mBroadcast, times(0)) in testRegister_audioSharingFlagOff()
251 verify(mBroadcast) in testRegister_audioSharingFlagOn()
268 verify(mBroadcast, times(0)) in testUnregister_audioSharingFlagOff()
283 verify(mBroadcast).unregisterServiceCallBack(any(BluetoothLeBroadcast.Callback.class)); in testUnregister_audioSharingFlagOn()
310 when(mBroadcast.isEnabled(null)).thenReturn(true); in setTitle_inCallState_showCallStateTitle()
323 when(mBroadcast.isEnabled(null)).thenReturn(false); in setTitle_notInCallState_notInAudioSharing_showMediaStateTitle()
336 when(mBroadcast.isEnabled(null)).thenReturn(true); in setTitle_notInCallState_audioSharingFlagOff_showMediaStateTitle()
349 when(mBroadcast.isEnabled(null)).thenReturn(true); in setTitle_notInCallState_inAudioSharing_showAudioSharingMediaStateTitle()
430 when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast); in setUpBroadcast()
/packages/apps/Settings/src/com/android/settings/connecteddevice/
DAvailableMediaDeviceGroupController.java75 @Nullable private LocalBluetoothLeBroadcast mBroadcast; field in AvailableMediaDeviceGroupController
184 mBroadcast = in AvailableMediaDeviceGroupController()
364 if (mBroadcast != null) { in registerAudioSharingCallbacks()
365 mBroadcast.registerServiceCallBack(mExecutor, mBroadcastCallback); in registerAudioSharingCallbacks()
376 if (mBroadcast != null) { in unregisterAudioSharingCallbacks()
377 mBroadcast.unregisterServiceCallBack(mBroadcastCallback); in unregisterAudioSharingCallbacks()

12