Guard against null BluetoothDevice extras.

Bug: 188364781
Change-Id: If976318763fac7e5cb4b59300f104c9cd9392eaf
This commit is contained in:
Jeff Sharkey
2021-05-16 20:45:07 -06:00
parent 5014fbd644
commit 804cb8801d

View File

@@ -11470,7 +11470,9 @@ public class Intent implements Parcelable, Cloneable {
if (mAction != null && mAction.startsWith("android.bluetooth.")
&& hasExtra(BluetoothDevice.EXTRA_DEVICE)) {
final BluetoothDevice device = getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
device.prepareToEnterProcess(source);
if (device != null) {
device.prepareToEnterProcess(source);
}
}
}