diff options
author | Sudharma Damgatla <sudharma@codeaurora.org> | 2015-09-15 15:49:38 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:25:59 -0600 |
commit | dfcb7fe55be7c1024e800b42dd93f903840548b9 (patch) | |
tree | a49c7743b5de0e45a9a663b78d8cbaa95f68a717 /src/com/android/bluetooth/hfp/HeadsetStateMachine.java | |
parent | 9a6a57621d81e7c83fb5ba72aea93110e788b646 (diff) | |
download | android_packages_apps_Bluetooth-dfcb7fe55be7c1024e800b42dd93f903840548b9.tar.gz android_packages_apps_Bluetooth-dfcb7fe55be7c1024e800b42dd93f903840548b9.tar.bz2 android_packages_apps_Bluetooth-dfcb7fe55be7c1024e800b42dd93f903840548b9.zip |
Fix for issues reported by Static analysis tool.
Fixed klockworks issues in the project of BT
at repo: packages/apps/Bluetooth.
Change-Id: Id1cc1f0799a3408981014d9bdde38e971af49808
Diffstat (limited to 'src/com/android/bluetooth/hfp/HeadsetStateMachine.java')
-rw-r--r-- | src/com/android/bluetooth/hfp/HeadsetStateMachine.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/hfp/HeadsetStateMachine.java b/src/com/android/bluetooth/hfp/HeadsetStateMachine.java index 2ac722fbb..e96c0c881 100644 --- a/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +++ b/src/com/android/bluetooth/hfp/HeadsetStateMachine.java @@ -2720,8 +2720,10 @@ final class HeadsetStateMachine extends StateMachine { int mCodec = 0; HashMap<String, Integer> AudioParam = mHeadsetAudioParam.get(device); if (AudioParam != null && !AudioParam.isEmpty()) { - mCodec = AudioParam.get("codec"); - mNrec = AudioParam.get("NREC"); + if (AudioParam.containsKey("codec")) + mCodec = AudioParam.get("codec"); + if (AudioParam.containsKey("NREC")) + mNrec = AudioParam.get("NREC"); } else { Log.e(TAG,"setAudioParameters: AudioParam not found"); } |