Remove unnecessary source code

This commit is contained in:
Lyubomir Marinov 2017-01-26 21:08:50 -06:00
parent ef39baab47
commit bab94a207d
2 changed files with 3 additions and 10 deletions

View File

@ -19,7 +19,6 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -55,7 +54,7 @@ public class AudioModeModule extends ReactContextBaseJavaModule {
*
*/
private static final String ACTION_HEADSET_PLUG
= (android.os.Build.VERSION.SDK_INT >= 21)
= (Build.VERSION.SDK_INT >= 21)
? AudioManager.ACTION_HEADSET_PLUG
: Intent.ACTION_HEADSET_PLUG;

View File

@ -15,8 +15,6 @@ import android.util.Log;
import com.facebook.react.bridge.ReactContext;
import java.util.List;
/**
* Helper class to detect and handle Bluetooth device changes. It monitors
* Bluetooth headsets being connected / disconnected and notifies the module
@ -81,9 +79,6 @@ public class BluetoothHeadsetMonitor {
audioManager
= (AudioManager)
reactContext.getSystemService(Context.AUDIO_SERVICE);
bluetoothAdapter = null;
bluetoothHeadset = null;
bluetoothProfileListener = null;
mainThreadHandler = new Handler(Looper.getMainLooper());
}
@ -106,9 +101,8 @@ public class BluetoothHeadsetMonitor {
if (bluetoothHeadset == null) {
headsetAvailable = false;
} else {
List<BluetoothDevice> devices
= bluetoothHeadset.getConnectedDevices();
headsetAvailable = !devices.isEmpty();
headsetAvailable
= !bluetoothHeadset.getConnectedDevices().isEmpty();
}
audioModeModule.onAudioDeviceChange();
}