Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java |
index 0f6607eb7e7a5cb09f00e7eab95307db2068178b..ed5a928d2efc03cd7e9d81b198d78223b293c99f 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java |
@@ -48,6 +48,8 @@ public class WebappLauncherActivity extends Activity { |
ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.DEFAULT); |
int webappSource = IntentUtils.safeGetIntExtra(intent, |
ShortcutHelper.EXTRA_SOURCE, ShortcutSource.UNKNOWN); |
+ long webappThemeColor = IntentUtils.safeGetLongExtra(intent, |
+ ShortcutHelper.EXTRA_THEME_COLOR, ShortcutHelper.THEME_COLOR_INVALID_OR_MISSING); |
String webappName = WebappInfo.nameFromIntent(intent); |
String webappShortName = WebappInfo.shortNameFromIntent(intent); |
@@ -62,7 +64,7 @@ public class WebappLauncherActivity extends Activity { |
if (webappMac != null && WebappAuthenticator.isUrlValid(this, webappUrl, webappMac)) { |
LaunchMetrics.recordHomeScreenLaunchIntoStandaloneActivity(webappUrl, webappSource); |
launchIntent = createWebappIntent(webappId, webappUrl, webappIcon, webappName, |
- webappShortName, webappOrientation, webappSource); |
+ webappShortName, webappOrientation, webappSource, webappThemeColor); |
} else { |
Log.e(TAG, "Shortcut (" + webappUrl + ") opened in Chrome."); |
@@ -90,10 +92,11 @@ public class WebappLauncherActivity extends Activity { |
* @param name String to show on the splash screen. |
* @param shortName String to show on the recents menu |
* @param orientation Default orientation for the activity. |
+ * @param themeColor Theme color to use for the activity. |
* @return Intent that can be used to launch the releveant WebappActivity. |
*/ |
private Intent createWebappIntent(String id, String url, String icon, String name, |
- String shortName, int orientation, int source) { |
+ String shortName, int orientation, int source, long themeColor) { |
String activityName = WebappActivity.class.getName(); |
if (!FeatureUtilities.isDocumentModeEligible(this)) { |
// Specifically assign the app to a particular WebappActivity instance. |
@@ -111,6 +114,7 @@ public class WebappLauncherActivity extends Activity { |
webappIntent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName); |
webappIntent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation); |
webappIntent.putExtra(ShortcutHelper.EXTRA_SOURCE, source); |
+ webappIntent.putExtra(ShortcutHelper.EXTRA_THEME_COLOR, themeColor); |
// On L, firing intents with the exact same data should relaunch a particular Activity. |
webappIntent.setAction(Intent.ACTION_VIEW); |