Index: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java |
index c7178ef1d0dcb9307758efccd9d426c15a0a29cf..e95bab985d1aabc91fefde57052ae388f70e012a 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java |
@@ -767,12 +767,23 @@ public class ChromeLauncherActivity extends Activity |
private Intent launchWebapp(Intent intent) { |
String webappId = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_ID); |
String webappUrl = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_URL); |
- String webappTitle = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_TITLE); |
String webappIcon = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_ICON); |
int webappOrientation = IntentUtils.safeGetIntExtra(intent, |
ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.DEFAULT); |
int webappSource = IntentUtils.safeGetIntExtra(intent, |
ShortcutHelper.EXTRA_SOURCE, ShortcutSource.UNKNOWN); |
+ String webappName = IntentUtils.safeGetStringExtra(intent, |
+ ShortcutHelper.EXTRA_NAME); |
+ String webappShortName = IntentUtils.safeGetStringExtra(intent, |
+ ShortcutHelper.EXTRA_SHORT_NAME); |
+ |
+ // The reference to title has been kept for reasons of backward compatibility. For intents |
+ // and shortcuts which were created before we utilized the concept of name and shortName, |
+ // we set the name and shortName to be the title. |
+ String webappTitle = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_TITLE); |
+ webappTitle = webappTitle == null ? "" : webappTitle; |
+ webappShortName = webappShortName == null ? webappTitle : webappShortName; |
+ webappName = webappName == null ? webappTitle : webappName; |
if (webappId != null && webappUrl != null) { |
String webappMacString = IntentUtils.safeGetStringExtra( |
@@ -786,8 +797,8 @@ public class ChromeLauncherActivity extends Activity |
webappUrl, webappSource); |
} |
- WebappActivity.launchInstance(this, webappId, |
- webappUrl, webappIcon, webappTitle, webappOrientation, webappSource); |
+ WebappActivity.launchInstance(this, webappId, webappUrl, |
+ webappIcon, webappName, webappShortName, webappOrientation, webappSource); |
} else { |
Log.e(TAG, "Shortcut (" + webappUrl + ") opened in Chrome."); |