Removing CAB from AllApps

-Removed CAB and single selection mode
-Replaced it with trash and appinfo drag targets
 at the top right of the tab view

Change-Id: Ic4acaaef7fc71dc2ca0bffd516da31e85af1be69
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index eacaef9..8a8ef59 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -59,6 +59,7 @@
 import android.database.ContentObserver;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Color;
 import android.graphics.Rect;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
@@ -90,8 +91,6 @@
 import android.view.ViewGroup;
 import android.view.WindowManager;
 import android.view.View.OnLongClickListener;
-import android.view.animation.AccelerateInterpolator;
-import android.view.animation.DecelerateInterpolator;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.Advanceable;
 import android.widget.EditText;
@@ -960,6 +959,29 @@
         deleteZone.setHandle(findViewById(deleteZoneHandleId));
         dragController.addDragListener(deleteZone);
 
+        DeleteZone allAppsDeleteZone = (DeleteZone) findViewById(R.id.all_apps_delete_zone);
+        if (allAppsDeleteZone != null) {
+            allAppsDeleteZone.setLauncher(this);
+            allAppsDeleteZone.setDragController(dragController);
+            allAppsDeleteZone.setDragAndDropEnabled(false);
+            dragController.addDragListener(allAppsDeleteZone);
+            dragController.addDropTarget(allAppsDeleteZone);
+        }
+
+        ApplicationInfoDropTarget allAppsInfoTarget = (ApplicationInfoDropTarget)
+                findViewById(R.id.all_apps_info_target);
+        if (allAppsInfoTarget != null) {
+            allAppsInfoTarget.setLauncher(this);
+            dragController.addDragListener(allAppsInfoTarget);
+            allAppsInfoTarget.setDragColor(getResources().getColor(R.color.app_info_filter));
+            allAppsInfoTarget.setDragAndDropEnabled(false);
+            View marketButton = findViewById(R.id.market_button);
+            if (marketButton != null) {
+                marketButton.setBackgroundColor(Color.RED);
+                allAppsInfoTarget.setHandle(marketButton);
+            }
+        }
+
         ApplicationInfoDropTarget infoButton = (ApplicationInfoDropTarget)findViewById(R.id.info_button);
         if (infoButton != null) {
             infoButton.setLauncher(this);
@@ -978,6 +1000,12 @@
         if (infoButton != null) {
             dragController.addDropTarget(infoButton);
         }
+        if (allAppsInfoTarget != null) {
+            dragController.addDropTarget(allAppsInfoTarget);
+        }
+        if (allAppsDeleteZone != null) {
+            dragController.addDropTarget(allAppsDeleteZone);
+        }
     }
 
     @SuppressWarnings({"UnusedDeclaration"})