浏览代码

Remove unnecessary source code

j8
Lyubomir Marinov 8 年前
父节点
当前提交
bab94a207d

+ 1
- 2
android/app/src/main/java/org/jitsi/meet/audiomode/AudioModeModule.java 查看文件

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

+ 2
- 8
android/app/src/main/java/org/jitsi/meet/audiomode/BluetoothHeadsetMonitor.java 查看文件

@@ -15,8 +15,6 @@ import android.util.Log;
15 15
 
16 16
 import com.facebook.react.bridge.ReactContext;
17 17
 
18
-import java.util.List;
19
-
20 18
 /**
21 19
  * Helper class to detect and handle Bluetooth device changes.  It monitors
22 20
  * Bluetooth headsets being connected / disconnected and notifies the module
@@ -81,9 +79,6 @@ public class BluetoothHeadsetMonitor {
81 79
         audioManager
82 80
             = (AudioManager)
83 81
                 reactContext.getSystemService(Context.AUDIO_SERVICE);
84
-        bluetoothAdapter = null;
85
-        bluetoothHeadset = null;
86
-        bluetoothProfileListener = null;
87 82
         mainThreadHandler = new Handler(Looper.getMainLooper());
88 83
     }
89 84
 
@@ -106,9 +101,8 @@ public class BluetoothHeadsetMonitor {
106 101
                 if (bluetoothHeadset == null) {
107 102
                     headsetAvailable = false;
108 103
                 } else {
109
-                    List<BluetoothDevice> devices
110
-                        = bluetoothHeadset.getConnectedDevices();
111
-                    headsetAvailable = !devices.isEmpty();
104
+                    headsetAvailable
105
+                        = !bluetoothHeadset.getConnectedDevices().isEmpty();
112 106
                 }
113 107
                 audioModeModule.onAudioDeviceChange();
114 108
             }

正在加载...
取消
保存