Merge "Cleaning up icon code."
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index 7af5392..1c4b9db 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -556,7 +556,8 @@
                 final int index = i - startIndex;
                 final ApplicationInfo info = mFilteredApps.get(i);
                 PagedViewIcon icon = (PagedViewIcon) layout.getChildOnPageAt(index);
-                icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1));
+                icon.applyFromApplicationInfo(
+                        info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1));
 
                 PagedViewCellLayout.LayoutParams params =
                     (PagedViewCellLayout.LayoutParams) icon.getLayoutParams();
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 197eeec..307140d 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -505,7 +505,8 @@
             ApplicationInfo info = mApps.get(i);
             PagedViewIcon icon = (PagedViewIcon) mLayoutInflater.inflate(
                     R.layout.apps_customize_application, layout, false);
-            icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1));
+            icon.applyFromApplicationInfo(
+                    info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1));
             icon.setOnClickListener(this);
             icon.setOnLongClickListener(this);
             icon.setOnTouchListener(this);
diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java
index eea38f1..f9adce0 100644
--- a/src/com/android/launcher2/CellLayoutChildren.java
+++ b/src/com/android/launcher2/CellLayoutChildren.java
@@ -16,12 +16,9 @@
 
 package com.android.launcher2;
 
-import java.util.ArrayList;
-
 import android.app.WallpaperManager;
 import android.content.Context;
 import android.graphics.Rect;
-import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index c942b0c..b61713a 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -1073,7 +1073,8 @@
             final ApplicationInfo info = mApps.get(i);
             PagedViewIcon icon = (PagedViewIcon) mInflater.inflate(
                     R.layout.all_apps_paged_view_application, layout, false);
-            icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1));
+            icon.applyFromApplicationInfo(
+                    info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1));
             icon.setOnClickListener(this);
             icon.setOnTouchListener(this);
             icon.setOnLongClickListener(this);
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index c10a2b1..7aeb0af 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -34,7 +34,6 @@
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.widget.Checkable;
-import android.widget.TextView;
 
 
 
@@ -58,7 +57,6 @@
     private int mAlpha = 255;
     private int mHolographicAlpha;
 
-    private boolean mHolographicEffectsEnabled;
     private boolean mIsChecked;
     private ObjectAnimator mCheckedAlphaAnimator;
     private float mCheckedAlpha = 1.0f;
@@ -134,7 +132,6 @@
         }
 
         mHolographicOutlineView = new HolographicPagedViewIcon(context, this);
-        mHolographicEffectsEnabled = isHardwareAccelerated();
     }
 
     protected HolographicPagedViewIcon getHolographicOutlineView() {
@@ -167,7 +164,7 @@
             mIconCache = cache;
             mIconCacheKey = new PagedViewIconCache.Key(info);
             mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
-            if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
+            if (!queueHolographicOutlineCreation()) {
                 getHolographicOutlineView().invalidate();
             }
         }
@@ -185,7 +182,7 @@
             mIconCache = cache;
             mIconCacheKey = new PagedViewIconCache.Key(info);
             mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
-            if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
+            if (!queueHolographicOutlineCreation()) {
                 getHolographicOutlineView().invalidate();
             }
         }
@@ -221,7 +218,7 @@
 
         // draw any blended overlays
         if (mCheckedOutline == null) {
-            if (mHolographicEffectsEnabled && mHolographicOutline != null
+            if (canvas.isHardwareAccelerated() && mHolographicOutline != null
                     && mHolographicAlpha > 0) {
                 mPaint.setAlpha(mHolographicAlpha);
                 overlay = mHolographicOutline;
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 8a2009c..d394016 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -155,7 +155,6 @@
     private int[] mTempCell = new int[2];
     private int[] mTempEstimate = new int[2];
     private float[] mDragViewVisualCenter = new float[2];
-    private float[] mTempOriginXY = new float[2];
     private float[] mTempDragCoordinates = new float[2];
     private float[] mTempTouchCoordinates = new float[2];
     private float[] mTempCellLayoutCenterCoordinates = new float[2];