am 0d2adfbb: Potential fix for a couple bugs

* commit '0d2adfbbb3b2f2990fc2265dfadca0252a5b4bb5':
  Potential fix for a couple bugs
This commit is contained in:
Adam Cohen authored and Android Git Automerger committed 2014-09-04 00:34:37 +00:00
commit c665e3637b
2 files changed
+10 -2

No files matched your search

@@ -366,8 +366,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// This code triggers requestLayout so must be posted outside of the
// layout pass.
public void run() {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
if (isAttachedToWindow()) {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
}
}
});
}
+6
View File
@@ -3373,6 +3373,9 @@ public class Launcher extends Activity
final AnimatorSet stateAnimation = mStateAnimation;
final Runnable startAnimRunnable = new Runnable() {
public void run() {
if (!toView.isAttachedToWindow()) {
return;
}
// Check that mStateAnimation hasn't changed while
// we waited for a layout/draw pass
if (mStateAnimation != stateAnimation)
@@ -3618,6 +3621,9 @@ public class Launcher extends Activity
final AnimatorSet stateAnimation = mStateAnimation;
final Runnable startAnimRunnable = new Runnable() {
public void run() {
if (!fromView.isAttachedToWindow()) {
return;
}
// Check that mStateAnimation hasn't changed while
// we waited for a layout/draw pass
if (mStateAnimation != stateAnimation)