Make contact shortcut smaller

Bug: 3400135
Change-Id: Ibc7fc35d846cbc871efed04bd14bc71076537ae9
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
index 6ffbb31..d29eba2 100644
--- a/res/values-xlarge/dimens.xml
+++ b/res/values-xlarge/dimens.xml
@@ -22,4 +22,5 @@
     <dimen name="action_bar_filter_max_width">120dip</dimen>
     <dimen name="action_bar_search_max_width">300dip</dimen>
     <dimen name="action_bar_search_spacing">12dip</dimen>
+    <dimen name="shortcut_icon_size">64dip</dimen>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 0b2cffd..47150b4 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -73,4 +73,6 @@
     <!-- Spacing on the left the search field in the action bar -->
     <dimen name="action_bar_search_spacing">12dip</dimen>
 
+    <!-- Size of the shortcut icon. 0dip means: use the system default -->    
+    <dimen name="shortcut_icon_size">0dip</dimen>
 </resources>
diff --git a/src/com/android/contacts/list/ShortcutIntentBuilder.java b/src/com/android/contacts/list/ShortcutIntentBuilder.java
index 101b6d5..43a6c1e 100644
--- a/src/com/android/contacts/list/ShortcutIntentBuilder.java
+++ b/src/com/android/contacts/list/ShortcutIntentBuilder.java
@@ -75,7 +75,7 @@
 
     private final OnShortcutIntentCreatedListener mListener;
     private final Context mContext;
-    private final int mIconSize;
+    private int mIconSize;
     private final int mIconDensity;
 
     /**
@@ -99,7 +99,10 @@
 
         final ActivityManager am = (ActivityManager) context
                 .getSystemService(Context.ACTIVITY_SERVICE);
-        mIconSize = am.getLauncherLargeIconSize();
+        mIconSize = context.getResources().getDimensionPixelSize(R.dimen.shortcut_icon_size);
+        if (mIconSize == 0) {
+            mIconSize = am.getLauncherLargeIconSize();
+        }
         mIconDensity = am.getLauncherLargeIconDensity();
     }