Show a dialog if bluetooth key is missing when reconnecting

BUG: 360031750
Test: atest BluetoothKeyMissingDialogTest
Flag: com.android.settings.flags.enable_bluetooth_key_missing_dialog
Change-Id: Iab75675b4cd8fec7ab55516cd0f057a9c7d92f7e
This commit is contained in:
Haijie Hong
2024-08-26 11:21:49 +08:00
parent f94d376104
commit 34cf0cbea1
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">