diff options
| author | venkata Jagadeesh <vjagad@codeaurora.org> | 2015-10-08 11:13:53 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-22 17:18:05 -0700 |
| commit | 36c29193bc129d903b23bb2d8cfabf521cc3cd44 (patch) | |
| tree | f24766d91fe06987a771890db610655e209f5c31 | |
| parent | f36c88df114d69ddb5143167642af5f5d493257a (diff) | |
| download | packages_apps_Settings-36c29193bc129d903b23bb2d8cfabf521cc3cd44.tar.gz packages_apps_Settings-36c29193bc129d903b23bb2d8cfabf521cc3cd44.tar.bz2 packages_apps_Settings-36c29193bc129d903b23bb2d8cfabf521cc3cd44.zip | |
Bluetooth: GAP: Handled Null check for getbluetoothclass
Handled Null check for getbluetoothclass in BluetoothPairingDialog
Change-Id: I549b3cd997b2749c7f0d0dd01a842267cdd20311
CRs-Fixed: 920191
| -rwxr-xr-x | src/com/android/settings/bluetooth/BluetoothPairingDialog.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java index cb06d5d3e..456b7e93d 100755 --- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java @@ -212,8 +212,8 @@ public final class BluetoothPairingDialog extends AlertActivity implements } } }); - if (mDevice.getBluetoothClass().getDeviceClass() - == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) { + if ((mDevice.getBluetoothClass() != null) && (mDevice.getBluetoothClass().getDeviceClass() + == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE)) { contactSharing.setVisibility(View.VISIBLE); } else { contactSharing.setVisibility(View.GONE); @@ -284,8 +284,8 @@ public final class BluetoothPairingDialog extends AlertActivity implements } } }); - if (mDevice.getBluetoothClass().getDeviceClass() - == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) { + if ((mDevice.getBluetoothClass() != null) && (mDevice.getBluetoothClass().getDeviceClass() + == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE)) { contactSharing.setVisibility(View.VISIBLE); } else { contactSharing.setVisibility(View.GONE); |
