From 36c29193bc129d903b23bb2d8cfabf521cc3cd44 Mon Sep 17 00:00:00 2001 From: venkata Jagadeesh Date: Thu, 8 Oct 2015 11:13:53 +0530 Subject: Bluetooth: GAP: Handled Null check for getbluetoothclass Handled Null check for getbluetoothclass in BluetoothPairingDialog Change-Id: I549b3cd997b2749c7f0d0dd01a842267cdd20311 CRs-Fixed: 920191 --- src/com/android/settings/bluetooth/BluetoothPairingDialog.java | 8 ++++---- 1 file 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); -- cgit v1.2.3