Merge "Guard against null BluetoothDevice extras." into sc-dev am: 53deb833da

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14556719

Change-Id: I0ea14e7400870472d975df0359c001091ce39999
This commit is contained in:
Jeff Sharkey
2021-05-17 03:11:50 +00:00
committed by Automerger Merge Worker

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() {