From 5051b8a4fa29ecc847a05345452ec2a53eb0ab60 Mon Sep 17 00:00:00 2001 From: Arseniy Borisov Date: Wed, 1 Feb 2017 16:14:21 +0300 Subject: [PATCH] pass static --- .../components/utils/audio/HeadsetStateObserver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/touchin/roboswag/components/utils/audio/HeadsetStateObserver.java b/src/main/java/ru/touchin/roboswag/components/utils/audio/HeadsetStateObserver.java index 69ebcb1..8b808b2 100644 --- a/src/main/java/ru/touchin/roboswag/components/utils/audio/HeadsetStateObserver.java +++ b/src/main/java/ru/touchin/roboswag/components/utils/audio/HeadsetStateObserver.java @@ -94,6 +94,7 @@ public final class HeadsetStateObserver { @SuppressWarnings("deprecation") public IsConnectedReceiver(@NonNull final AudioManager audioManager) { + super(); isWiredConnectedChangedEvent = BehaviorSubject.create(audioManager.isWiredHeadsetOn()); isWirelessConnectedChangedEvent = BehaviorSubject.create(audioManager.isBluetoothA2dpOn()); } @@ -103,8 +104,8 @@ public final class HeadsetStateObserver { if (Intent.ACTION_HEADSET_PLUG.equals(intent.getAction()) && !isInitialStickyBroadcast()) { isWiredConnectedChangedEvent.onNext(intent.getIntExtra("state", 0) != 0); } - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB && - BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED.equals(intent.getAction())) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB + && BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED.equals(intent.getAction())) { final int bluetoothState = intent.getIntExtra(BluetoothA2dp.EXTRA_STATE, BluetoothA2dp.STATE_DISCONNECTED); switch (bluetoothState) { case BluetoothA2dp.STATE_DISCONNECTED: