diff options
author | Eric Laurent <elaurent@google.com> | 2011-09-02 14:20:56 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-09-02 15:59:50 -0700 |
commit | dca56b9432e2cc851d1a58920071fed2e1e3d142 (patch) | |
tree | dec365b40e97c1e8331db5e0174548251aebdb92 /core/java/android/bluetooth/BluetoothProfileState.java | |
parent | 5afd2bd02ae44d5a38f9e560047723ddab176405 (diff) | |
download | frameworks_base-dca56b9432e2cc851d1a58920071fed2e1e3d142.zip frameworks_base-dca56b9432e2cc851d1a58920071fed2e1e3d142.tar.gz frameworks_base-dca56b9432e2cc851d1a58920071fed2e1e3d142.tar.bz2 |
Fix issue 5252593: any app can restart the runtime
Replace null device address string by empty sting.
Change-Id: I285c35f3345334e6d2190493b1a8a5aca1a361a4
Diffstat (limited to 'core/java/android/bluetooth/BluetoothProfileState.java')
-rw-r--r-- | core/java/android/bluetooth/BluetoothProfileState.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothProfileState.java b/core/java/android/bluetooth/BluetoothProfileState.java index 98afdb8..b0c0a0b 100644 --- a/core/java/android/bluetooth/BluetoothProfileState.java +++ b/core/java/android/bluetooth/BluetoothProfileState.java @@ -59,7 +59,9 @@ public class BluetoothProfileState extends StateMachine { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); - + if (device == null) { + return; + } if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) { int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0); if (mProfile == HFP && (newState == BluetoothProfile.STATE_CONNECTED || |