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,9 +11470,11 @@ public class Intent implements Parcelable, Cloneable {
if (mAction != null && mAction.startsWith("android.bluetooth.") if (mAction != null && mAction.startsWith("android.bluetooth.")
&& hasExtra(BluetoothDevice.EXTRA_DEVICE)) { && hasExtra(BluetoothDevice.EXTRA_DEVICE)) {
final BluetoothDevice device = getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); final BluetoothDevice device = getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if (device != null) {
device.prepareToEnterProcess(source); device.prepareToEnterProcess(source);
} }
} }
}
/** @hide */ /** @hide */
public boolean hasWebURI() { public boolean hasWebURI() {