From 499293f096ef3182ef39e42cc06284501022b5cf Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Wed, 6 Mar 2013 18:08:45 +0100 Subject: [PATCH] Improve swipe performance in Recents --- packages/SystemUI/src/com/android/systemui/SwipeHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index 8e1773ada5460..f824a8e068a05 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -156,6 +156,12 @@ public class SwipeHelper implements Gefingerpoken { private void updateAlphaFromOffset(View animView, boolean dismissable) { if (FADE_OUT_DURING_SWIPE && dismissable) { + float alpha = getAlphaForOffset(animView); + if (alpha != 0f && alpha != 1f) { + animView.setLayerType(View.LAYER_TYPE_HARDWARE, null); + } else { + animView.setLayerType(View.LAYER_TYPE_NONE, null); + } animView.setAlpha(getAlphaForOffset(animView)); } invalidateGlobalRegion(animView);