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

Delta Between Two Patch Sets: mobile/android/base/updater/UpdateServiceHelper.java

Issue 4865921483014144: Check adblockplus.org for updates (Closed)
Left Patch Set: Add version number to addonVersion, change platform/platformVersion Created Jan. 26, 2015, 1:55 p.m.
Right Patch Set: Removed hard coded type=0, changed platform to gecko Created Feb. 23, 2015, 10:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | mobile/android/branding/adblockbrowser/configure.sh » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko.updater; 6 package org.mozilla.gecko.updater;
7 7
8 import org.mozilla.gecko.AppConstants; 8 import org.mozilla.gecko.AppConstants;
9 import org.mozilla.gecko.util.GeckoJarReader; 9 import org.mozilla.gecko.util.GeckoJarReader;
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public static final String EXTRA_UPDATE_FLAGS_NAME = "updateFlags"; 47 public static final String EXTRA_UPDATE_FLAGS_NAME = "updateFlags";
48 48
49 // Name of the Intent extra that holds the APK path, used with ACTION_APPLY_ UPDATE 49 // Name of the Intent extra that holds the APK path, used with ACTION_APPLY_ UPDATE
50 public static final String EXTRA_PACKAGE_PATH_NAME = "packagePath"; 50 public static final String EXTRA_PACKAGE_PATH_NAME = "packagePath";
51 51
52 private static final String LOGTAG = "UpdateServiceHelper"; 52 private static final String LOGTAG = "UpdateServiceHelper";
53 private static final String DEFAULT_UPDATE_LOCALE = "en-US"; 53 private static final String DEFAULT_UPDATE_LOCALE = "en-US";
54 54
55 private static final String UPDATE_URL = 55 private static final String UPDATE_URL =
56 "https://adblockplus.org/devbuilds/adblockbrowser/updates.xml" + 56 "https://adblockplus.org/devbuilds/adblockbrowser/updates.xml" +
57 "?type=0" + 57 "?addonName=adblockbrowser" +
Wladimir Palant 2015/02/18 18:05:55 What is this type=0 about?
Felix Dahlke 2015/02/19 13:40:22 How I understood it, this means it's an automatic
Wladimir Palant 2015/02/23 12:32:24 Yes, that's what I remembered as well which is why
Felix Dahlke 2015/02/23 22:24:00 Yeah that's a good point, I've removed it.
58 "&addonName=adblockbrowser" +
59 "&addonVersion=" + AppConstants.MOZ_APP_VERSION + ".%BUILDID%" + 58 "&addonVersion=" + AppConstants.MOZ_APP_VERSION + ".%BUILDID%" +
60 "&applicationName=android" + 59 "&applicationName=android" +
61 "&applicationVersion=%OS_VERSION%" + 60 "&applicationVersion=%OS_VERSION%" +
62 "&platform=mozilla" + 61 "&platform=gecko" +
63 "&platformVersion=" + AppConstants.MOZILLA_VERSION + 62 "&platformVersion=" + AppConstants.MOZILLA_VERSION +
Wladimir Palant 2015/02/18 18:05:55 Technically speaking, isn't this Adblock Plus for
Felix Dahlke 2015/02/19 13:40:22 No, it's Adblock Browser's update mechanism, just
Felix Dahlke 2015/02/19 22:21:58 Note that we probably want to go with your variant
Wladimir Palant 2015/02/23 12:32:24 Fair enough. Still, the platform should be "gecko"
Felix Dahlke 2015/02/23 22:24:00 Done.
64 "&locale=%LOCALE%"; 63 "&locale=%LOCALE%";
65 64
66 public enum CheckUpdateResult { 65 public enum CheckUpdateResult {
67 // Keep these in sync with mobile/android/chrome/content/about.xhtml 66 // Keep these in sync with mobile/android/chrome/content/about.xhtml
68 NOT_AVAILABLE, 67 NOT_AVAILABLE,
69 AVAILABLE, 68 AVAILABLE,
70 DOWNLOADING, 69 DOWNLOADING,
71 DOWNLOADED 70 DOWNLOADED
72 } 71 }
73 72
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 public static void registerForUpdates(Context context, int policy) { 129 public static void registerForUpdates(Context context, int policy) {
131 if (!isUpdaterEnabled()) 130 if (!isUpdaterEnabled())
132 return; 131 return;
133 132
134 Intent intent = new Intent(UpdateServiceHelper.ACTION_REGISTER_FOR_UPDAT ES, null, context, UpdateService.class); 133 Intent intent = new Intent(UpdateServiceHelper.ACTION_REGISTER_FOR_UPDAT ES, null, context, UpdateService.class);
135 intent.putExtra(EXTRA_AUTODOWNLOAD_NAME, policy); 134 intent.putExtra(EXTRA_AUTODOWNLOAD_NAME, policy);
136 135
137 context.startService(intent); 136 context.startService(intent);
138 } 137 }
139 } 138 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld