Show a dialog if bluetooth key is missing when reconnecting
Previous change is reverted due to test failure in b/362901443.
BUG: 360031750
Test: atest BluetoothKeyMissingDialogTest
Flag: com.android.settings.flags.enable_bluetooth_key_missing_dialog
Change-Id: I05b940e8aac26c14f93baa19c224ad98c291b891
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7b79611..13aafc9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3230,6 +3230,19 @@
</intent-filter>
</activity>
+ <activity android:name=".bluetooth.BluetoothKeyMissingDialog"
+ android:permission="android.permission.BLUETOOTH_PRIVILEGED"
+ android:excludeFromRecents="true"
+ android:windowSoftInputMode="stateVisible|adjustResize"
+ android:theme="@style/Theme.AlertDialog"
+ android:exported="false"
+ android:taskAffinity=".bluetooth.BluetoothKeyMissingDialog">
+ <intent-filter android:priority="1">
+ <action android:name="android.bluetooth.device.action.KEY_MISSING" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".bluetooth.RequestPermissionActivity"
android:excludeFromRecents="true"
android:permission="android.permission.BLUETOOTH_CONNECT"
@@ -3284,6 +3297,13 @@
</intent-filter>
</receiver>
+ <receiver android:name=".bluetooth.BluetoothKeyMissingReceiver"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.bluetooth.device.action.KEY_MISSING" />
+ </intent-filter>
+ </receiver>
+
<receiver android:name=".bluetooth.BluetoothPermissionRequest"
android:exported="true"
android:permission="android.permission.BLUETOOTH_CONNECT">