Skip to content

Commit

Permalink
Don't mark as error if app not found in Google Play.
Browse files Browse the repository at this point in the history
  • Loading branch information
rumboalla committed Aug 29, 2016
1 parent 7c2b1af commit a0df756
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 9
targetSdkVersion 24
versionCode 1
versionName "1.1.2"
versionName "1.1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
applicationVariants.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.apkupdater.util.VersionUtil;

import org.jsoup.HttpStatusException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
Expand Down Expand Up @@ -65,6 +66,13 @@ protected UpdaterStatus parseUrl(
}

return UpdaterStatus.STATUS_UPDATE_NOT_FOUND;
} catch (HttpStatusException status) {
if (status.getStatusCode() == 404) {
return UpdaterStatus.STATUS_UPDATE_NOT_FOUND;
} else {
mError = status;
return UpdaterStatus.STATUS_ERROR;
}
} catch (Exception e) {
mError = e;
return UpdaterStatus.STATUS_ERROR;
Expand Down

0 comments on commit a0df756

Please sign in to comment.