Merge "Guard against null BluetoothDevice extras." into sc-dev

This commit is contained in:
Jeff Sharkey
2021-05-17 02:54:58 +00:00
committed by Android (Google) Code Review

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);
}
}
}