Fixing regression from g/649060 regarding building layers for detached views.

Bug: 21063014

Change-Id: Iff0dba8be5fe7ef5dce4fc65fb6391c33c50b253
This commit is contained in:
Winson Chung 2015-05-12 18:55:26 -07:00
parent ed0c1cc739
commit 11509ad61a
1 changed files with 4 additions and 2 deletions

View File

@ -378,11 +378,12 @@ public class LauncherStateTransitionAnimation {
dispatchOnLauncherTransitionStart(toView, animated, false);
// Enable all necessary layers
boolean isLmpOrAbove = Utilities.isLmpOrAbove();
for (View v : layerViews.keySet()) {
if (layerViews.get(v) == BUILD_AND_SET_LAYER) {
v.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
if (Utilities.isViewAttachedToWindow(v)) {
if (isLmpOrAbove && Utilities.isViewAttachedToWindow(v)) {
v.buildLayer();
}
}
@ -697,11 +698,12 @@ public class LauncherStateTransitionAnimation {
dispatchOnLauncherTransitionStart(toView, animated, false);
// Enable all necessary layers
boolean isLmpOrAbove = Utilities.isLmpOrAbove();
for (View v : layerViews.keySet()) {
if (layerViews.get(v) == BUILD_AND_SET_LAYER) {
v.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
if (Utilities.isLmpOrAbove()) {
if (isLmpOrAbove && Utilities.isViewAttachedToWindow(v)) {
v.buildLayer();
}
}