Turning on hardware layers for the workspace

- Obsoletes need for CachedViewGroup and CachedTextView on workspace as well

Bug #3413433
This commit is contained in:
Michael Jurka
2011-02-01 15:05:06 -08:00
parent bfadaad352
commit bdb5c5342a
4 changed files with 28 additions and 61 deletions
-23
View File
@@ -281,7 +281,6 @@ public class Workspace extends SmoothPagedView
@Override
public void onAnimationStart(Animator animation) {
mIsInUnshrinkAnimation = true;
disableCacheUpdates();
}
@Override
@@ -299,19 +298,13 @@ public class Workspace extends SmoothPagedView
mDrawCustomizeTrayBackground = false;
}
mWallpaperOffset.setOverrideHorizontalCatchupConstant(false);
enableCacheUpdates();
mAnimator = null;
}
};
mShrinkAnimationListener = new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
disableCacheUpdates();
}
@Override
public void onAnimationEnd(Animator animation) {
mWallpaperOffset.setOverrideHorizontalCatchupConstant(false);
enableCacheUpdates();
mAnimator = null;
}
};
@@ -1039,22 +1032,6 @@ public class Workspace extends SmoothPagedView
}
}
public void enableCacheUpdates() {
final int pageCount = getChildCount();
for (int i = 0; i < pageCount; i++) {
final CellLayout page = (CellLayout) getChildAt(i);
page.enableCacheUpdates();
}
}
public void disableCacheUpdates() {
final int pageCount = getChildCount();
for (int i = 0; i < pageCount; i++) {
final CellLayout page = (CellLayout) getChildAt(i);
page.disableCacheUpdates();
}
}
@Override
protected void onDraw(Canvas canvas) {
updateWallpaperOffsets();