Small fix in Folder text editing

Change-Id: I65c6862cbbc125b197bb6afa4951b267373832e9
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 1b863de..8a198f8 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -53,7 +53,8 @@
  * Represents a set of icons chosen by the user or generated by the system.
  */
 public class Folder extends LinearLayout implements DragSource, View.OnClickListener,
-        View.OnLongClickListener, DropTarget, FolderListener, TextView.OnEditorActionListener {
+        View.OnLongClickListener, DropTarget, FolderListener, TextView.OnEditorActionListener,
+        View.OnFocusChangeListener {
 
     private static final String TAG = "Launcher.Folder";
 
@@ -148,6 +149,7 @@
         mContent.setGridSize(0, 0);
         mFolderName = (FolderEditText) findViewById(R.id.folder_name);
         mFolderName.setFolder(this);
+        mFolderName.setOnFocusChangeListener(this);
 
         // We find out how tall the text view wants to be (it is set to wrap_content), so that
         // we can allocate the appropriate amount of space for it.
@@ -193,16 +195,6 @@
         }
     }
 
-    public boolean onInterceptTouchEvent(MotionEvent ev) {
-        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
-            mFolderName.getHitRect(mHitRect);
-            if (mHitRect.contains((int) ev.getX(), (int) ev.getY()) && !mIsEditingName) {
-                startEditingFolderName();
-            }
-        }
-        return false;
-    }
-
     public boolean onLongClick(View v) {
         Object tag = v.getTag();
         if (tag instanceof ShortcutInfo) {
@@ -1024,4 +1016,10 @@
     public void getLocationInDragLayer(int[] loc) {
         mLauncher.getDragLayer().getLocationInDragLayer(this, loc);
     }
+
+    public void onFocusChange(View v, boolean hasFocus) {
+        if (v == mFolderName && hasFocus) {
+            startEditingFolderName();
+        }
+    }
 }