Skip to content

Commit

Permalink
Do not use WebRTC on pre-Kitkat devices (Android 4.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkryl committed Aug 3, 2023
1 parent 796987a commit b7424b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/main/java/org/thunderdog/challegram/voip/VoIP.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ public static void setForceDisableVersion (String version, boolean isForceDisabl
}

public static boolean isForceDisabled (String version) {
return forceDisabledVersions != null && forceDisabledVersions.contains(version);
if (forceDisabledVersions != null) {
return forceDisabledVersions.contains(version);
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return !version.equals(VoIPController.getVersion());
} else {
return false;
}
}

private static boolean forceDisableAcousticEchoCancellation, forceDisableNoiseSuppressor, forceDisableAutomaticGainControl;
Expand Down

0 comments on commit b7424b6

Please sign in to comment.