Merge "[Audiosharing] When bt is off or unsupported, we show "Please connect a device" dialog after camera scans a QR code" into main

This commit is contained in:
Chelsea Hao
2025-01-05 19:07:56 -08:00
committed by Android (Google) Code Review
2 changed files with 18 additions and 0 deletions

View File

@@ -139,6 +139,15 @@ public class AudioStreamConfirmDialogActivityTest {
verify(mLocalBluetoothProfileManager, never()).addServiceListener(any());
}
@Test
public void setupActivity_serviceNotReady_bluetoothOff_doNothing() {
when(mAssistant.isProfileReady()).thenReturn(false);
mShadowBluetoothAdapter.setEnabled(false);
mActivity = Robolectric.setupActivity(AudioStreamConfirmDialogActivity.class);
verify(mLocalBluetoothProfileManager, never()).addServiceListener(any());
}
@Test
public void onStop_unregisterCallback() {
mActivity = Robolectric.setupActivity(AudioStreamConfirmDialogActivity.class);