Potential fix for a couple bugs
issue 17371274 issue 17368590 Change-Id: I717f9c37613efd9d61e401540ca82aff77058022
This commit is contained in:
@@ -366,8 +366,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
|||||||
// This code triggers requestLayout so must be posted outside of the
|
// This code triggers requestLayout so must be posted outside of the
|
||||||
// layout pass.
|
// layout pass.
|
||||||
public void run() {
|
public void run() {
|
||||||
setDataIsReady();
|
if (isAttachedToWindow()) {
|
||||||
onDataReady(getMeasuredWidth(), getMeasuredHeight());
|
setDataIsReady();
|
||||||
|
onDataReady(getMeasuredWidth(), getMeasuredHeight());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3373,6 +3373,9 @@ public class Launcher extends Activity
|
|||||||
final AnimatorSet stateAnimation = mStateAnimation;
|
final AnimatorSet stateAnimation = mStateAnimation;
|
||||||
final Runnable startAnimRunnable = new Runnable() {
|
final Runnable startAnimRunnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (!toView.isAttachedToWindow()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Check that mStateAnimation hasn't changed while
|
// Check that mStateAnimation hasn't changed while
|
||||||
// we waited for a layout/draw pass
|
// we waited for a layout/draw pass
|
||||||
if (mStateAnimation != stateAnimation)
|
if (mStateAnimation != stateAnimation)
|
||||||
@@ -3618,6 +3621,9 @@ public class Launcher extends Activity
|
|||||||
final AnimatorSet stateAnimation = mStateAnimation;
|
final AnimatorSet stateAnimation = mStateAnimation;
|
||||||
final Runnable startAnimRunnable = new Runnable() {
|
final Runnable startAnimRunnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (!fromView.isAttachedToWindow()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Check that mStateAnimation hasn't changed while
|
// Check that mStateAnimation hasn't changed while
|
||||||
// we waited for a layout/draw pass
|
// we waited for a layout/draw pass
|
||||||
if (mStateAnimation != stateAnimation)
|
if (mStateAnimation != stateAnimation)
|
||||||
|
|||||||
Reference in New Issue
Block a user