Skip to content

Commit e0cf0fb

Browse files
committed
tweaks
1 parent d70f12a commit e0cf0fb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

android/src/main/java/io/getstream/webrtc/flutter/audio/AudioFocusManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public enum InterruptionSource {
2929
private TelephonyCallback telephonyCallback;
3030

3131
private AudioFocusChangeListener focusChangeListener;
32-
private boolean interruptionActive = false;
32+
private volatile boolean interruptionActive = false;
3333

3434
private final AudioManager.OnAudioFocusChangeListener audioSwitchFocusListener = focusChange -> {
3535
switch (focusChange) {

android/src/main/java/io/getstream/webrtc/flutter/audio/AudioSwitchManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void start() {
159159
handler.removeCallbacksAndMessages(null);
160160
handler.postAtFrontOfQueue(() -> {
161161
if (!isActive) {
162-
Objects.requireNonNull(audioSwitch).activate();
162+
audioSwitch.activate();
163163
isActive = true;
164164
}
165165
});

lib/src/helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class Helper {
183183
if (WebRTC.platformIsAndroid) {
184184
return await WebRTC.invokeMethod('regainAndroidAudioFocus');
185185
} else {
186-
throw Exception('regainAndroidAudioFocus only support for Android');
186+
throw Exception('regainAndroidAudioFocus is only supported on Android');
187187
}
188188
}
189189

lib/src/native/factory_impl.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class RTCFactoryNative extends RTCFactory {
3434
AndroidInterruptionSource androidInterruptionSource =
3535
AndroidInterruptionSource.audioFocusAndTelephony,
3636
@Deprecated(
37-
'Audio focus in now handled in a way that does not require this parameter. It will be removed in the next major version.')
37+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.')
3838
AndroidAudioAttributesUsageType? androidAudioAttributesUsageType,
3939
@Deprecated(
40-
'Audio focus in now handled in a way that does not require this parameter. It will be removed in the next major version.')
40+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.')
4141
AndroidAudioAttributesContentType? androidAudioAttributesContentType,
4242
}) async {
4343
if (!Platform.isAndroid && !Platform.isIOS) {
@@ -144,10 +144,10 @@ Future<void> handleCallInterruptionCallbacks(
144144
AndroidInterruptionSource androidInterruptionSource =
145145
AndroidInterruptionSource.audioFocusAndTelephony,
146146
@Deprecated(
147-
'Audio focus in now handled in a way that does not require this parameter. It will be removed in the next major version.')
147+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.')
148148
AndroidAudioAttributesUsageType? androidAudioAttributesUsageType,
149149
@Deprecated(
150-
'Audio focus in now handled in a way that does not require this parameter. It will be removed in the next major version.')
150+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.')
151151
AndroidAudioAttributesContentType? androidAudioAttributesContentType,
152152
}) {
153153
return (RTCFactoryNative.instance as RTCFactoryNative)

0 commit comments

Comments
 (0)