summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSmriti Gupta <smritig@codeaurora.org>2014-11-18 13:10:30 +0530
committerSteve Kondik <steve@cyngn.com>2015-03-14 23:47:57 -0700
commit23f14f2dac028507ec77ee45f84ecaa39f6470ba (patch)
treef02b8f2399ca91a8b88d97c25b9b27dc9410a219
parent488d66040067421262e5afd49185e734fd0656eb (diff)
downloadandroid_packages_apps_BluetoothExt-23f14f2dac028507ec77ee45f84ecaa39f6470ba.tar.gz
android_packages_apps_BluetoothExt-23f14f2dac028507ec77ee45f84ecaa39f6470ba.tar.bz2
android_packages_apps_BluetoothExt-23f14f2dac028507ec77ee45f84ecaa39f6470ba.zip
PBAP C: Fix klocwork issue
This change will fix the klocwork issue coming with respect to BluetoothPbapTestActivity. Change-Id: Iffc45dc24796e718fc75c1d2c55743c871dd9839 CRs-fixed: 758578
-rw-r--r--bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java
index 0fb64e0..90b771f 100644
--- a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java
+++ b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java
@@ -467,10 +467,12 @@ public class ServicesFragment extends ListFragment {
case PBAP:
if (isChecked) {
- mActivity.mProfileService.getPbapClient().connect();
+ if (mActivity.mProfileService.getPbapClient()!= null)
+ mActivity.mProfileService.getPbapClient().connect();
buttonView.setEnabled(false);
} else {
- mActivity.mProfileService.getPbapClient().disconnect();
+ if (mActivity.mProfileService.getPbapClient()!= null)
+ mActivity.mProfileService.getPbapClient().disconnect();
buttonView.setEnabled(false);
}
break;