Reland: Update UI for unsupported Android OS and make Jelly Bean unsupported.
This CL updates the UI to show a badge icon in the app menu icon
whenever the user is running Chrome on a currently unsupported Android
version. This badge in the app menu is only displayed once, until the
user taps the app menu icon. If the user does in fact get a new version,
the badge state is reset, and will be shown again. The current behavior
for out of date users stays the same as before (once per cold start).
In addition, a new menu item is displayed at the top of the menu that
explains that Chrome is unable to update. Nothing happens when you tap
the menu item in the case of an unsupported OS version.
The new menu item and the new warning message in About Chrome will
always be displayed when the user is in this state, regardless of
whether the app menu has already been tapped (which removes the badge).
This CL also updates the UI in Settings - About Chrome to show a new
message and a warning icon when the user is running Chrome on an
unsupported version of the Android OS.
By default, Jelly Bean is considered unsupported after this CL, but this
can be overridden from the variations framework.
It is possible to use command line flags or chrome://flags for
testing the different states, though that does not impact the
About Chrome screen.
Binary-Size: This CL adds new assets and the minimal code required.
Bug: 847940
Change-Id: I0d8653c8ac93f80241c70283effe2105e20af190
Reviewed-on: https://chromium-review.googlesource.com/c/1289470
Reviewed-by: Theresa <[email protected]>
Commit-Queue: Tommy Nyquist <[email protected]>
Cr-Commit-Position: refs/heads/master@{#600964}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index cdb73d5..91fc451 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -433,6 +433,16 @@
switches::kChromeHomeSwipeLogicType, "velocity"},
};
+const FeatureEntry::Choice kForceUpdateMenuTypeChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {flag_descriptions::kUpdateMenuTypeNone, switches::kForceUpdateMenuType,
+ "none"},
+ {flag_descriptions::kUpdateMenuTypeUpdateAvailable,
+ switches::kForceUpdateMenuType, "update_available"},
+ {flag_descriptions::kUpdateMenuTypeUnsupportedOSVersion,
+ switches::kForceUpdateMenuType, "unsupported_os_version"},
+};
+
const FeatureEntry::FeatureParam kCCTModuleCache_ZeroMinutes[] = {
{"cct_module_cache_time_limit_ms", "0"}};
const FeatureEntry::FeatureParam kCCTModuleCache_OneMinute[] = {
@@ -2618,9 +2628,9 @@
flag_descriptions::kEnableImageCaptureAPIDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kImageCaptureAPI)},
#if defined(OS_ANDROID)
- {"force-show-update-menu-item", flag_descriptions::kUpdateMenuItemName,
- flag_descriptions::kUpdateMenuItemDescription, kOsAndroid,
- SINGLE_VALUE_TYPE(switches::kForceShowUpdateMenuItem)},
+ {"force-update-menu-type", flag_descriptions::kUpdateMenuTypeName,
+ flag_descriptions::kUpdateMenuTypeDescription, kOsAndroid,
+ MULTI_VALUE_TYPE(kForceUpdateMenuTypeChoices)},
{"update-menu-item-custom-summary",
flag_descriptions::kUpdateMenuItemCustomSummaryName,
flag_descriptions::kUpdateMenuItemCustomSummaryDescription, kOsAndroid,