Support precomposed app icons.
The precomposed icon overrides any other touch icon. We still need to do the
round rect clip because apparently apple still applies the rounded corners, just
not the glass effect. Inset the rectangle by 1 to fit the icons better.
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index f8c80d8..23fcc5a 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -401,8 +401,10 @@
// an inverse fill so we can punch a hole using the round rect.
Path path = new Path();
path.setFillType(Path.FillType.INVERSE_WINDING);
- path.addRoundRect(new RectF(0, 0, touchIcon.getWidth(),
- touchIcon.getHeight()), 8f, 8f, Path.Direction.CW);
+ RectF rect = new RectF(0, 0, touchIcon.getWidth(),
+ touchIcon.getHeight());
+ rect.inset(1, 1);
+ path.addRoundRect(rect, 8f, 8f, Path.Direction.CW);
// Construct a paint that clears the outside of the rectangle and
// draw.