diff options
author | Andre Eisenbach <eisenbach@google.com> | 2014-07-24 12:01:37 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2014-07-24 12:03:34 -0700 |
commit | 2609a11670563837625f7dde2192deaba7417e46 (patch) | |
tree | 4b5eb10032b40f007dd36036ced517a90c391746 /src/com/android/bluetooth/a2dp | |
parent | d981566d5912bfd66fc265508e5b0c43dce76f82 (diff) | |
download | android_packages_apps_Bluetooth-2609a11670563837625f7dde2192deaba7417e46.tar.gz android_packages_apps_Bluetooth-2609a11670563837625f7dde2192deaba7417e46.tar.bz2 android_packages_apps_Bluetooth-2609a11670563837625f7dde2192deaba7417e46.zip |
Fix A2dp crash when re-starting Bluetooth services
When the Bluetooth process has died, the services will be restarted to
recover from a crash. This could cause an exception in the A2dp service
because the service maybe stopped without having successfully been
started before. Added null-check to prevent an exception during the
restart.
Bug: 16529242
Change-Id: I57c99ec72c0ba09c6c5325b262e83618aacb3e39
Diffstat (limited to 'src/com/android/bluetooth/a2dp')
-rwxr-xr-x | src/com/android/bluetooth/a2dp/A2dpService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/a2dp/A2dpService.java b/src/com/android/bluetooth/a2dp/A2dpService.java index 31bd38ed0..808ec9890 100755 --- a/src/com/android/bluetooth/a2dp/A2dpService.java +++ b/src/com/android/bluetooth/a2dp/A2dpService.java @@ -62,7 +62,9 @@ public class A2dpService extends ProfileService { if (mStateMachine != null) { mStateMachine.doQuit(); } - mAvrcp.doQuit(); + if (mAvrcp != null) { + mAvrcp.doQuit(); + } return true; } |