Fix: restoring holo outlines in paged views on tablet
Change-Id: Ifb319731f76c8154e2dff5336641862b7427d836
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index 95bb72f..d9852ad 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -33,7 +33,6 @@
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.Checkable;
-import android.widget.TextView;
@@ -57,7 +56,6 @@
private int mAlpha = 255;
private int mHolographicAlpha;
- private boolean mHolographicEffectsEnabled;
private boolean mIsChecked;
private ObjectAnimator mCheckedAlphaAnimator;
private float mCheckedAlpha = 1.0f;
@@ -133,7 +131,6 @@
}
mHolographicOutlineView = new HolographicPagedViewIcon(context, this);
- mHolographicEffectsEnabled = isHardwareAccelerated();
}
protected HolographicPagedViewIcon getHolographicOutlineView() {
@@ -166,7 +163,7 @@
mIconCache = cache;
mIconCacheKey = new PagedViewIconCache.Key(info);
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
- if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
+ if (!queueHolographicOutlineCreation()) {
getHolographicOutlineView().invalidate();
}
}
@@ -184,7 +181,7 @@
mIconCache = cache;
mIconCacheKey = new PagedViewIconCache.Key(info);
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
- if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
+ if (!queueHolographicOutlineCreation()) {
getHolographicOutlineView().invalidate();
}
}
@@ -220,7 +217,7 @@
// draw any blended overlays
if (mCheckedOutline == null) {
- if (mHolographicEffectsEnabled && mHolographicOutline != null
+ if (canvas.isHardwareAccelerated() && mHolographicOutline != null
&& mHolographicAlpha > 0) {
mPaint.setAlpha(mHolographicAlpha);
overlay = mHolographicOutline;