浏览代码

Remove unnecessary source code

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

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

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

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

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

正在加载...
取消
保存