| 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 86c69141d79ba80056b577fd539a4469fcdc16f0..e0fc61f9528c3b9e315ba8c0061176c6b5f50dc1 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
|
| @@ -400,8 +400,17 @@ public class ShortcutHelper {
|
| ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
| int maxInnerSize = Math.round(am.getLauncherLargeIconSize() * MAX_INNER_SIZE_RATIO);
|
| int innerSize = Math.min(maxInnerSize, Math.max(webIcon.getWidth(), webIcon.getHeight()));
|
| - int padding = Math.round(ICON_PADDING_RATIO * innerSize);
|
| - int outerSize = innerSize + 2 * padding;
|
| +
|
| + int outerSize = innerSize;
|
| + Rect innerBounds = new Rect(0, 0, innerSize, innerSize);
|
| +
|
| + // Draw the icon with padding around it if all four corners are not transparent. Otherwise,
|
| + // don't add padding.
|
| + if (shouldPadIcon(webIcon)) {
|
| + int padding = Math.round(ICON_PADDING_RATIO * innerSize);
|
| + outerSize += 2 * padding;
|
| + innerBounds.offset(padding, padding);
|
| + }
|
|
|
| Bitmap bitmap = null;
|
| try {
|
| @@ -414,15 +423,6 @@ public class ShortcutHelper {
|
| Canvas canvas = new Canvas(bitmap);
|
| Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
| paint.setFilterBitmap(true);
|
| - Rect innerBounds;
|
| -
|
| - // Draw the icon with padding around it if all four corners are not transparent. Otherwise,
|
| - // don't add padding.
|
| - if (shouldPadIcon(webIcon)) {
|
| - innerBounds = new Rect(padding, padding, outerSize - padding, outerSize - padding);
|
| - } else {
|
| - innerBounds = new Rect(0, 0, outerSize, outerSize);
|
| - }
|
| canvas.drawBitmap(webIcon, null, innerBounds, paint);
|
|
|
| return bitmap;
|
|
|