Fix exception in key missing dialog when rotating screen

BUG: 387915075
Test: atest BluetoothKeyMissingDialogTest
Flag: com.android.settings.flags.enable_bluetooth_key_missing_dialog
Change-Id: I966954f27d074a5ca0dc329cb142c1ab66b3b013
This commit is contained in:
Haijie Hong
2025-01-13 16:17:09 +08:00
parent 44e13bf11e
commit f761a30040
3 changed files with 30 additions and 6 deletions

View File

@@ -40,7 +40,8 @@ public class BluetoothKeyMissingDialog extends FragmentActivity {
finish();
return;
}
BluetoothKeyMissingDialogFragment fragment = new BluetoothKeyMissingDialogFragment(device);
BluetoothKeyMissingDialogFragment fragment =
BluetoothKeyMissingDialogFragment.newInstance(device);
fragment.show(getSupportFragmentManager(), FRAGMENT_TAG);
closeSystemDialogs();
}