Making "tap to add" in customization mode automatically
add to the current screen
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index f55b46e..03c4bce 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -368,12 +368,27 @@
                 c.setChecked(!wasChecked);
 
                 // End the current choice mode when we have no items selected
-                if (!c.isChecked()) {
+                /*if (!c.isChecked()) {
                     endChoiceMode();
                 } else if (isChoiceMode(CHOICE_MODE_NONE)) {
                     endChoiceMode();
                     startChoiceMode(CHOICE_MODE_SINGLE, this);
-                }
+                }*/
+                mChoiceMode = CHOICE_MODE_SINGLE;
+
+                Workspace w = mLauncher.getWorkspace();
+                int currentWorkspaceScreen = mLauncher.getCurrentWorkspaceScreen();
+                final CellLayout cl = (CellLayout)w.getChildAt(currentWorkspaceScreen);
+                cl.setHover(true);
+
+                animateClickFeedback(v, new Runnable() {
+                    @Override
+                    public void run() {
+                        cl.setHover(false);
+                        mLauncher.onWorkspaceClick(cl);
+                        mChoiceMode = CHOICE_MODE_NONE;
+                    }
+                });
             }
             return;
         }
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 17d18f8..5aec48e 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -104,7 +104,7 @@
     // Multiple selection mode is not supported by all Launcher actions atm
     protected static final int CHOICE_MODE_MULTIPLE = 2;
 
-    private int mChoiceMode;
+    protected int mChoiceMode;
     private ActionMode mActionMode;
 
     protected PagedViewIconCache mPageViewIconCache;
@@ -1084,7 +1084,7 @@
         if (!isChoiceMode(CHOICE_MODE_NONE)) {
             mChoiceMode = CHOICE_MODE_NONE;
             resetCheckedGrandchildren();
-            mActionMode.finish();
+            if (mActionMode != null) mActionMode.finish();
             mActionMode = null;
         }
     }