v3.1.0: Fixed github updates checking Android API on desktop
This commit is contained in:
committed by
Evan Debenham
parent
0b3176ed55
commit
b2dfcb9500
@@ -68,7 +68,7 @@ public class GitHubUpdates extends UpdateService {
|
|||||||
public void handleHttpResponse(Net.HttpResponse httpResponse) {
|
public void handleHttpResponse(Net.HttpResponse httpResponse) {
|
||||||
try {
|
try {
|
||||||
Bundle latestRelease = null;
|
Bundle latestRelease = null;
|
||||||
int latestVersionCode = Game.versionCode;
|
int latestVersionCode = Game.versionCode-10;
|
||||||
|
|
||||||
for (Bundle b : Bundle.read( httpResponse.getResultAsStream() ).getBundleArray()){
|
for (Bundle b : Bundle.read( httpResponse.getResultAsStream() ).getBundleArray()){
|
||||||
Matcher m = versionCodePattern.matcher(b.getString("body"));
|
Matcher m = versionCodePattern.matcher(b.getString("body"));
|
||||||
@@ -86,7 +86,7 @@ public class GitHubUpdates extends UpdateService {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// or that aren't compatible
|
// or that aren't compatible
|
||||||
} else if (DeviceCompat.isDesktop()){
|
} else if (DeviceCompat.isAndroid()){
|
||||||
Matcher minAndroid = minAndroidPattern.matcher(b.getString("body"));
|
Matcher minAndroid = minAndroidPattern.matcher(b.getString("body"));
|
||||||
if (minAndroid.find() && DeviceCompat.getPlatformVersion() < Integer.parseInt(minAndroid.group(1))){
|
if (minAndroid.find() && DeviceCompat.getPlatformVersion() < Integer.parseInt(minAndroid.group(1))){
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user