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 4a617233c96d5af336083cc9673ecdd94edd9389..329a67e3da6f299dfb486082fc594b8bf30f735e 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
| @@ -4,6 +4,7 @@ |
| package org.chromium.chrome.browser; |
| +import android.app.ActivityManager; |
| import android.content.Context; |
| import android.content.Intent; |
| import android.graphics.Bitmap; |
| @@ -41,12 +42,14 @@ public class ShortcutHelper { |
| * @param tab Tab to create a shortcut for. |
|
Yaron
2013/10/25 18:50:17
Nit: update
michaelbai
2013/10/25 19:01:00
Done.
|
| * @param userRequestedTitle Updated title for the shortcut. |
| */ |
| - public static void addShortcut(TabBase tab, String userRequestedTitle) { |
| + public static void addShortcut(Context appContext, TabBase tab, String userRequestedTitle) { |
| if (TextUtils.isEmpty(sFullScreenAction)) { |
| Log.e("ShortcutHelper", "ShortcutHelper is uninitialized. Aborting."); |
| return; |
| } |
| - nativeAddShortcut(tab.getNativePtr(), userRequestedTitle); |
| + ActivityManager am = (ActivityManager) appContext.getSystemService( |
| + Context.ACTIVITY_SERVICE); |
| + nativeAddShortcut(tab.getNativePtr(), userRequestedTitle, am.getLauncherLargeIconSize()); |
| } |
| /** |
| @@ -91,5 +94,6 @@ public class ShortcutHelper { |
| context.startActivity(homeIntent); |
| } |
| - private static native void nativeAddShortcut(int tabAndroidPtr, String userRequestedTitle); |
| + private static native void nativeAddShortcut(int tabAndroidPtr, String userRequestedTitle, |
| + int launcherLargeIconSize); |
| } |