|
@@ -158,7 +158,7 @@ class AudioModeModule extends ReactContextBaseJavaModule
|
158
|
158
|
/**
|
159
|
159
|
* Whether or not the ConnectionService is used for selecting audio devices.
|
160
|
160
|
*/
|
161
|
|
- private static boolean useConnectionService() {
|
|
161
|
+ static boolean useConnectionService() {
|
162
|
162
|
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
|
163
|
163
|
}
|
164
|
164
|
|
|
@@ -295,9 +295,9 @@ class AudioModeModule extends ReactContextBaseJavaModule
|
295
|
295
|
= (AudioManager)
|
296
|
296
|
reactContext.getSystemService(Context.AUDIO_SERVICE);
|
297
|
297
|
|
298
|
|
- // Starting Oreo the ConnectionImpl from ConnectionService us used to
|
|
298
|
+ // Starting Oreo the ConnectionImpl from ConnectionService is used to
|
299
|
299
|
// detect the available devices.
|
300
|
|
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
|
300
|
+ if (!useConnectionService()) {
|
301
|
301
|
// Setup runtime device change detection.
|
302
|
302
|
setupAudioRouteChangeDetection();
|
303
|
303
|
|