Merge "Fix NPE when starting advertising with null GATT" am: 4d98474f2a am: cff1ab6210 am: 5eaffc9ed7

am: f2c63d34b5

Change-Id: I43aa543e5ca87482f2973fac342d9b43c25b67e7
This commit is contained in:
Jakub Pawlowski
2018-08-09 02:19:48 -07:00
committed by android-build-merger

View File

@@ -411,7 +411,14 @@ public final class BluetoothLeAdvertiser {
try {
gatt = mBluetoothManager.getBluetoothGatt();
} catch (RemoteException e) {
Log.e(TAG, "Failed to get Bluetooth gatt - ", e);
Log.e(TAG, "Failed to get Bluetooth GATT - ", e);
postStartSetFailure(handler, callback,
AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
return;
}
if (gatt == null) {
Log.e(TAG, "Bluetooth GATT is null");
postStartSetFailure(handler, callback,
AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
return;