v0.8.2: added a settings menu tab for connectivity options

This commit is contained in:
Evan Debenham
2020-07-13 01:59:19 -04:00
parent a312ea8350
commit 192ecce74b
15 changed files with 173 additions and 22 deletions

View File

@@ -27,6 +27,7 @@ import com.badlogic.gdx.Net;
import com.watabou.noosa.Game;
import com.watabou.utils.Bundle;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.GameSettings;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -39,9 +40,9 @@ public class GitHubUpdates extends UpdateService {
private static Pattern versionCodePattern = Pattern.compile("internal version number: ([0-9]*)", Pattern.CASE_INSENSITIVE);
@Override
public void checkForUpdate(UpdateResultCallback callback) {
public void checkForUpdate(boolean useMetered, UpdateResultCallback callback) {
if (!Game.platform.connectedToUnmeteredNetwork()){
if (!useMetered && !Game.platform.connectedToUnmeteredNetwork()){
callback.onConnectionFailed();
return;
}