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
This commit is contained in:
Haijie Hong
2024-09-04 16:57:14 +08:00
parent f94d376104
commit f93aaadad0
9 changed files with 596 additions and 0 deletions

View File

@@ -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">