OpenDelta: always check for version on all file checks
to prevent old version images to have any impact Change-Id: Idc768bbe32d625a2006aa5b8648edf9ede877b73
This commit is contained in:
parent
2e2411f792
commit
999962565c
|
@ -55,4 +55,6 @@
|
|||
</string-array>
|
||||
|
||||
<string name="official_version_tag">NIGHTLY</string>
|
||||
|
||||
<string name="android_version">ro.build.version.release</string>
|
||||
</resources>
|
||||
|
|
|
@ -67,6 +67,7 @@ public class Config {
|
|||
private final String filename_base_prefix;
|
||||
private final String url_base_json;
|
||||
private final String official_version_tag;
|
||||
private final String android_version;
|
||||
|
||||
/*
|
||||
* Using reflection voodoo instead calling the hidden class directly, to
|
||||
|
@ -118,9 +119,11 @@ public class Config {
|
|||
secure_mode_enable = res.getBoolean(R.bool.secure_mode_enable);
|
||||
secure_mode_default = res.getBoolean(R.bool.secure_mode_default);
|
||||
url_base_json = res.getString(R.string.url_base_json);
|
||||
filename_base_prefix = String.format(Locale.ENGLISH,
|
||||
res.getString(R.string.filename_base), "");
|
||||
official_version_tag = res.getString(R.string.official_version_tag);
|
||||
android_version = getProperty(context,
|
||||
res.getString(R.string.android_version), "");
|
||||
filename_base_prefix = String.format(Locale.ENGLISH,
|
||||
res.getString(R.string.filename_base), android_version);
|
||||
boolean keep_screen_on = false;
|
||||
try {
|
||||
String[] devices = res
|
||||
|
|
|
@ -848,7 +848,7 @@ OnWantUpdateCheckListener, OnSharedPreferenceChangeListener {
|
|||
for (int i = 0; i < builds.length(); i++) {
|
||||
JSONObject build = builds.getJSONObject(i);
|
||||
String file = build.getString("filename");
|
||||
if (file.endsWith(".zip")) {
|
||||
if (file.endsWith(".zip") && file.startsWith(config.getFileBaseNamePrefix())) {
|
||||
buildNames.add(new File(file).getName());
|
||||
}
|
||||
}
|
||||
|
@ -1818,7 +1818,8 @@ OnWantUpdateCheckListener, OnSharedPreferenceChangeListener {
|
|||
String latestFullBuild = getNewestFullBuild();
|
||||
// if we dont even find a build on dl no sense to continue
|
||||
if (latestFullBuild == null) {
|
||||
Logger.d("no latest build found at " + config.getUrlBaseJson() + " for " + config.getDevice());
|
||||
Logger.d("no latest build found at " + config.getUrlBaseJson() +
|
||||
" for " + config.getDevice() + " prefix " + config.getFileBaseNamePrefix());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue