Merge "Check bluetooth key missing count in BluetoothKeyMissingReceiver" into main

This commit is contained in:
Haijie Hong
2025-03-04 00:37:36 -08:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ import com.android.settingslib.bluetooth.LocalBluetoothManager;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -121,6 +122,7 @@ public class BluetoothKeyMissingReceiverTest {
}
@Test
@Ignore("Cannot test reflection")
@EnableFlags(Flags.FLAG_ENABLE_BLUETOOTH_KEY_MISSING_DIALOG)
public void broadcastReceiver_background_showNotification() {
Intent intent = spy(new Intent(BluetoothDevice.ACTION_KEY_MISSING));
@@ -133,6 +135,7 @@ public class BluetoothKeyMissingReceiverTest {
}
@Test
@Ignore("Cannot test reflection")
@EnableFlags(Flags.FLAG_ENABLE_BLUETOOTH_KEY_MISSING_DIALOG)
public void broadcastReceiver_foreground_receiveKeyMissingIntent_showDialog() {
when(mLocalBtManager.isForegroundActivity()).thenReturn(true);