stop using hardware layers when workspace stops moving
helps workaround Bug 3417254 Change-Id: I874e5e52ab544fbb787e1021d6ee394e8f3a34d6
This commit is contained in:
@@ -306,9 +306,14 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
mWallpaperOffset.setOverrideHorizontalCatchupConstant(false);
|
||||
mAnimator = null;
|
||||
enableChildrenLayers(false);
|
||||
}
|
||||
};
|
||||
mShrinkAnimationListener = new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
enableChildrenLayers(true);
|
||||
}
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mWallpaperOffset.setOverrideHorizontalCatchupConstant(false);
|
||||
@@ -1253,6 +1258,25 @@ public class Workspace extends SmoothPagedView
|
||||
return super.onTouchEvent(ev);
|
||||
}
|
||||
|
||||
protected void enableChildrenLayers(boolean enable) {
|
||||
for (int i = 0; i < getPageCount(); i++) {
|
||||
setChildrenLayersEnabled(enable);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void pageBeginMoving() {
|
||||
enableChildrenLayers(true);
|
||||
super.pageBeginMoving();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void pageEndMoving() {
|
||||
if (!mIsSmall && !mIsInUnshrinkAnimation) {
|
||||
enableChildrenLayers(false);
|
||||
}
|
||||
super.pageEndMoving();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onWallpaperTap(MotionEvent ev) {
|
||||
final int[] position = mTempCell;
|
||||
|
||||
Reference in New Issue
Block a user