Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| index 354454644084a2911a540538130c4dc04cc5773b..a7122878eb0523294fdb7944da1a3322c7de6e25 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| @@ -38,12 +38,12 @@ public class ShortcutHelper { |
| * Adds a shortcut for the current Tab. |
| * @param tab Tab to create a shortcut for. |
| */ |
| - public static void addShortcut(TabBase tab) { |
| + public static void addShortcut(TabBase tab, String userRequestedTitle) { |
| if (sWebappActivityPackageName == null || sWebappActivityClassName == null) { |
| Log.e("ShortcutHelper", "ShortcutHelper is uninitialized. Aborting."); |
| return; |
| } |
| - nativeAddShortcut(tab.getNativePtr()); |
| + nativeAddShortcut(tab.getNativePtr(), userRequestedTitle); |
| } |
| /** |
| @@ -74,7 +74,11 @@ public class ShortcutHelper { |
| green, blue); |
| } |
| context.sendBroadcast(addIntent); |
| + Intent homeIntent = new Intent(Intent.ACTION_MAIN); |
|
gone
2013/09/13 00:31:53
Add comment here and in the javadoc saying it send
Ramya
2013/09/13 01:04:34
Done.
|
| + homeIntent.addCategory(Intent.CATEGORY_HOME); |
| + homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| + context.startActivity(homeIntent); |
| } |
| - private static native void nativeAddShortcut(int tabAndroidPtr); |
| + private static native void nativeAddShortcut(int tabAndroidPtr, String userRequestedTitle); |
| } |