Disabling certain effects (wallpaper transition, holographic icons in AllApps) if HW acceleration is not enabled.

Change-Id: I7926d5c3ba95c6d57999189677ff79f67b05434f
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index f1b8a01..95bb72f 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -57,6 +57,7 @@
     private int mAlpha = 255;
     private int mHolographicAlpha;
 
+    private boolean mHolographicEffectsEnabled;
     private boolean mIsChecked;
     private ObjectAnimator mCheckedAlphaAnimator;
     private float mCheckedAlpha = 1.0f;
@@ -132,6 +133,7 @@
         }
 
         mHolographicOutlineView = new HolographicPagedViewIcon(context, this);
+        mHolographicEffectsEnabled = isHardwareAccelerated();
     }
 
     protected HolographicPagedViewIcon getHolographicOutlineView() {
@@ -164,7 +166,7 @@
             mIconCache = cache;
             mIconCacheKey = new PagedViewIconCache.Key(info);
             mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
-            if (!queueHolographicOutlineCreation()) {
+            if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
                 getHolographicOutlineView().invalidate();
             }
         }
@@ -182,7 +184,7 @@
             mIconCache = cache;
             mIconCacheKey = new PagedViewIconCache.Key(info);
             mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
-            if (!queueHolographicOutlineCreation()) {
+            if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
                 getHolographicOutlineView().invalidate();
             }
         }
@@ -218,7 +220,8 @@
 
         // draw any blended overlays
         if (mCheckedOutline == null) {
-            if (mHolographicOutline != null && mHolographicAlpha > 0) {
+            if (mHolographicEffectsEnabled && mHolographicOutline != null
+                    && mHolographicAlpha > 0) {
                 mPaint.setAlpha(mHolographicAlpha);
                 overlay = mHolographicOutline;
             }