Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Issue 5252593: any app can restart the runtime
Browse files Browse the repository at this point in the history
Check for null BT device when receiving
BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED intent.

Change-Id: I89402cdede69a42a38bc56c5e8841daa9e6355af
  • Loading branch information
Eric Laurent committed Sep 2, 2011
1 parent 7ee3836 commit 8cdd749
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/com/android/voicedialer/VoiceDialerActivity.java
Expand Up @@ -450,6 +450,9 @@ public void onReceive(Context context, Intent intent) {
if (false) Log.d(TAG, "HEADSET STATE -> " + state);

if (state == BluetoothProfile.STATE_CONNECTED) {
if (device == null) {
return;
}
mBluetoothDevice = device;
updateBluetoothParameters(true);
} else if (state == BluetoothProfile.STATE_DISCONNECTED) {
Expand Down

0 comments on commit 8cdd749

Please sign in to comment.