Bug 1244701 - Message EOL plan to gingerbread users. r=margaret
MozReview-Commit-ID: ESJd870iP3N
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -28,17 +28,16 @@ import org.mozilla.gecko.favicons.Favico
import org.mozilla.gecko.favicons.OnFaviconLoadedListener;
import org.mozilla.gecko.favicons.decoders.IconDirectoryEntry;
import org.mozilla.gecko.firstrun.FirstrunAnimationContainer;
import org.mozilla.gecko.gfx.DynamicToolbarAnimator;
import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.LayerView;
import org.mozilla.gecko.home.BrowserSearch;
import org.mozilla.gecko.home.HomeBanner;
-import org.mozilla.gecko.home.HomeConfig;
import org.mozilla.gecko.home.HomeConfig.PanelType;
import org.mozilla.gecko.home.HomeConfigPrefsBackend;
import org.mozilla.gecko.home.HomePager;
import org.mozilla.gecko.home.HomePager.OnUrlOpenInBackgroundListener;
import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
import org.mozilla.gecko.home.HomePanelsManager;
import org.mozilla.gecko.home.SearchEngine;
import org.mozilla.gecko.javaaddons.JavaAddonManager;
@@ -189,17 +188,17 @@ public class BrowserApp extends GeckoApp
private static final String BROWSER_SEARCH_TAG = "browser_search";
// Request ID for startActivityForResult.
private static final int ACTIVITY_REQUEST_PREFERENCES = 1001;
private static final int ACTIVITY_REQUEST_TAB_QUEUE = 2001;
@RobocopTarget
public static final String EXTRA_SKIP_STARTPANE = "skipstartpane";
- private static final String HONEYCOMB_EOL_NOTIFIED = "honeycomb_eol_notified";
+ private static final String EOL_NOTIFIED = "eol_notified";
private BrowserSearch mBrowserSearch;
private View mBrowserSearchContainer;
public ViewGroup mBrowserChrome;
public ViewFlipper mActionBarFlipper;
public ActionModeCompatView mActionBar;
private BrowserToolbar mBrowserToolbar;
@@ -793,21 +792,21 @@ public class BrowserApp extends GeckoApp
SnackbarHelper.showSnackbarWithAction(this,
getString(R.string.updater_permission_text),
Snackbar.LENGTH_INDEFINITE,
getString(R.string.updater_permission_allow),
allowCallback);
}
- private void conditionallyNotifyHCEOL() {
+ private void conditionallyNotifyEOL() {
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
try {
final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this);
- if (!prefs.getBoolean(HONEYCOMB_EOL_NOTIFIED, false)) {
+ if (!prefs.contains(EOL_NOTIFIED)) {
// Launch main App to load SUMO url on EOL notification.
final String link = getString(R.string.eol_notification_url,
AppConstants.MOZ_APP_VERSION,
AppConstants.OS_TARGET,
Locales.getLanguageTag(Locale.getDefault()));
final Intent intent = new Intent(Intent.ACTION_VIEW);
@@ -819,22 +818,22 @@ public class BrowserApp extends GeckoApp
.setContentTitle(getString(R.string.eol_notification_title))
.setContentText(getString(R.string.eol_notification_summary))
.setSmallIcon(R.drawable.ic_status_logo)
.setAutoCancel(true)
.setContentIntent(pendingIntent)
.build();
final NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- final int notificationID = HONEYCOMB_EOL_NOTIFIED.hashCode();
+ final int notificationID = EOL_NOTIFIED.hashCode();
notificationManager.notify(notificationID, notification);
GeckoSharedPrefs.forProfile(this)
.edit()
- .putBoolean(HONEYCOMB_EOL_NOTIFIED, true)
+ .putBoolean(EOL_NOTIFIED, true)
.apply();
}
} finally {
StrictMode.setThreadPolicy(savedPolicy);
}
}
/**
@@ -2513,18 +2512,18 @@ public class BrowserApp extends GeckoApp
HomePanelsManager.getInstance().onLocaleReady(locale);
if (mMenu != null) {
mMenu.clear();
onCreateOptionsMenu(mMenu);
}
- if (!Versions.preHC && !Versions.feature14Plus) {
- conditionallyNotifyHCEOL();
+ if (!Versions.feature14Plus) {
+ conditionallyNotifyEOL();
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(LOGTAG, "onActivityResult: " + requestCode + ", " + resultCode + ", " + data);
switch (requestCode) {
case ACTIVITY_REQUEST_PREFERENCES:
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -771,10 +771,10 @@ just addresses the organization to follo
<!-- LOCALIZATION NOTE (bookmarks_restricted_webmaker):link title for https://webmaker.org -->
<!ENTITY bookmarks_restricted_webmaker "Learn the Web: Mozilla Webmaker">
<!-- LOCALIZATION NOTE (unsupported_sdk_version): The user installed a build of this app that does not support
the Android version of this device. the formatS1 is replaced by the CPU ABI (e.g., ARMv7); the formatS2 is
replaced by the Android OS version (e.g., 14)-->
<!ENTITY unsupported_sdk_version "Sorry! This &brandShortName; won\'t work on this device (&formatS1;, &formatS2;). Please download the correct version.">
-<!ENTITY eol_notification_title "&brandShortName; no longer supports Android 3">
+<!ENTITY eol_notification_title2 "&brandShortName; will no longer update">
<!ENTITY eol_notification_summary "Tap to learn more">
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -602,13 +602,13 @@
<string name="intent_uri_cannot_open">&intent_uri_cannot_open;</string>
<string name="intent_uri_private_browsing_prompt">&intent_uri_private_browsing_prompt;</string>
<string name="intent_uri_private_browsing_multiple_match_title">&intent_uri_private_browsing_multiple_match_title;</string>
<string name="devtools_auth_scan_header">&devtools_auth_scan_header;</string>
<string name="unsupported_sdk_version">&unsupported_sdk_version;</string>
- <string name="eol_notification_title">&eol_notification_title;</string>
+ <string name="eol_notification_title">&eol_notification_title2;</string>
<string name="eol_notification_summary">&eol_notification_summary;</string>
<!-- https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/honeycomb -->
- <string name="eol_notification_url">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/honeycomb</string>
+ <string name="eol_notification_url">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/unsupported-version</string>
</resources>