Removing some deprecated code around page layers

1) setChildrenDrawnWithCacheEnabled: deprecated
2) Removing custom logic based on isHardwareAccelerated. This check was not being
used consistantly everywhere

Bug: 29761236
Change-Id: Ic4a9c764f154497e376e37de2351fe04d1b48500
This commit is contained in:
Sunny Goyal
2016-10-26 13:14:03 -07:00
parent d1f034708b
commit 35fe7be54e
3 changed files with 2 additions and 85 deletions
@@ -201,28 +201,4 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
child.cancelLongPress();
}
}
@Override
protected void setChildrenDrawingCacheEnabled(boolean enabled) {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final View view = getChildAt(i);
view.setDrawingCacheEnabled(enabled);
// Update the drawing caches
if (!view.isHardwareAccelerated() && enabled) {
view.buildDrawingCache(true);
}
}
}
protected void setChildrenDrawnWithCacheEnabled(boolean enabled) {
super.setChildrenDrawnWithCacheEnabled(enabled);
}
@Override
public void setLayerType(int layerType, Paint paint) {
// When clip children is disabled do not use hardware layer,
// as hardware layer forces clip children.
super.setLayerType(getClipChildren() ? layerType : LAYER_TYPE_NONE, paint);
}
}