Correctly position the quick contact badge when opened from a folder.
Bug #2467438
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 7c35f79..435004d 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -17,6 +17,7 @@
 package com.android.launcher2;
 
 import android.content.Context;
+import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -47,7 +48,6 @@
      * Which item is being dragged
      */
     protected ShortcutInfo mDragItem;
-    private boolean mCloneInfo;
 
     /**
      * Used to inflate the Workspace from XML.
@@ -75,6 +75,10 @@
     
     public void onItemClick(AdapterView parent, View v, int position, long id) {
         ShortcutInfo app = (ShortcutInfo) parent.getItemAtPosition(position);
+        int[] pos = new int[2];
+        v.getLocationOnScreen(pos);
+        app.intent.setSourceBounds(new Rect(pos[0], pos[1],
+                pos[0] + v.getWidth(), pos[1] + v.getHeight()));
         mLauncher.startActivitySafely(app.intent);
     }
 
@@ -94,9 +98,6 @@
         }
 
         ShortcutInfo app = (ShortcutInfo) parent.getItemAtPosition(position);
-        if (mCloneInfo) {
-            app = new ShortcutInfo(app);
-        }
 
         mDragController.startDrag(view, this, app, DragController.DRAG_ACTION_COPY);
         mLauncher.closeFolder(this);
@@ -105,10 +106,6 @@
         return true;
     }
 
-    void setCloneInfo(boolean cloneInfo) {
-        mCloneInfo = cloneInfo;
-    }
-
     public void setDragController(DragController dragController) {
         mDragController = dragController;
     }
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 7f9b0d7..11b26c5 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1258,11 +1258,11 @@
         Object tag = v.getTag();
         if (tag instanceof ShortcutInfo) {
             // Open shortcut
-            final Intent intent = ((ShortcutInfo)tag).intent;
+            final Intent intent = ((ShortcutInfo) tag).intent;
             int[] pos = new int[2];
             v.getLocationOnScreen(pos);
-            intent.setSourceBounds(
-                    new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight()));
+            intent.setSourceBounds(new Rect(pos[0], pos[1],
+                    pos[0] + v.getWidth(), pos[1] + v.getHeight()));
             startActivitySafely(intent);
         } else if (tag instanceof FolderInfo) {
             handleFolderClick((FolderInfo) tag);