summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth/DockEventReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/bluetooth/DockEventReceiver.java')
-rw-r--r--src/com/android/settings/bluetooth/DockEventReceiver.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/settings/bluetooth/DockEventReceiver.java b/src/com/android/settings/bluetooth/DockEventReceiver.java
index a3b6b3c..048b098 100644
--- a/src/com/android/settings/bluetooth/DockEventReceiver.java
+++ b/src/com/android/settings/bluetooth/DockEventReceiver.java
@@ -59,8 +59,11 @@ public final class DockEventReceiver extends BroadcastReceiver {
if (Intent.ACTION_DOCK_EVENT.equals(intent.getAction())
|| ACTION_DOCK_SHOW_UI.endsWith(intent.getAction())) {
- if (device == null) {
- if (DEBUG) Log.d(TAG, "Device is missing");
+ if ((device == null) && (ACTION_DOCK_SHOW_UI.endsWith(intent.getAction()) ||
+ ((state != Intent.EXTRA_DOCK_STATE_UNDOCKED) &&
+ (state != Intent.EXTRA_DOCK_STATE_LE_DESK)))) {
+ if (DEBUG) Log.d(TAG,
+ "Wrong state: "+state+" or intent: "+intent.toString()+" with null device");
return;
}