Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: mobile/android/base/updater/UpdateServiceHelper.java

Issue 4865921483014144: Check adblockplus.org for updates (Closed)
Patch Set: Removed hard coded type=0, changed platform to gecko Created Feb. 23, 2015, 10:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mobile/android/branding/adblockbrowser/configure.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/base/updater/UpdateServiceHelper.java
===================================================================
--- a/mobile/android/base/updater/UpdateServiceHelper.java
+++ b/mobile/android/base/updater/UpdateServiceHelper.java
@@ -52,22 +52,15 @@
private static final String LOGTAG = "UpdateServiceHelper";
private static final String DEFAULT_UPDATE_LOCALE = "en-US";
- private static final String UPDATE_URL;
-
- static {
- final String pkgSpecial;
- if (AppConstants.MOZ_PKG_SPECIAL != null) {
- pkgSpecial = "-" + AppConstants.MOZ_PKG_SPECIAL;
- } else {
- pkgSpecial = "";
- }
- UPDATE_URL = "https://aus4.mozilla.org/update/4/" + AppConstants.MOZ_APP_BASENAME + "/" +
- AppConstants.MOZ_APP_VERSION +
- "/%BUILDID%/Android_" + AppConstants.MOZ_APP_ABI + pkgSpecial +
- "/%LOCALE%/" + AppConstants.MOZ_UPDATE_CHANNEL +
- "/%OS_VERSION%/default/default/" + AppConstants.MOZILLA_VERSION +
- "/update.xml";
- }
+ private static final String UPDATE_URL =
+ "https://adblockplus.org/devbuilds/adblockbrowser/updates.xml" +
+ "?addonName=adblockbrowser" +
+ "&addonVersion=" + AppConstants.MOZ_APP_VERSION + ".%BUILDID%" +
+ "&applicationName=android" +
+ "&applicationVersion=%OS_VERSION%" +
+ "&platform=gecko" +
+ "&platformVersion=" + AppConstants.MOZILLA_VERSION +
+ "&locale=%LOCALE%";
public enum CheckUpdateResult {
// Keep these in sync with mobile/android/chrome/content/about.xhtml
@@ -98,7 +91,7 @@
}
String url = UPDATE_URL.replace("%LOCALE%", locale).
- replace("%OS_VERSION%", Build.VERSION.RELEASE).
+ replace("%OS_VERSION%", String.valueOf(Build.VERSION.SDK_INT)).
replace("%BUILDID%", force ? "0" : AppConstants.MOZ_APP_BUILDID);
try {
« no previous file with comments | « no previous file | mobile/android/branding/adblockbrowser/configure.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld