diff options
author | Tony Wickham <twickham@google.com> | 2015-10-12 13:34:28 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-10-12 13:34:28 -0700 |
commit | 1636cddbb48d0ad45028efa8756f205e78936261 (patch) | |
tree | bcf942a39972f5bab3d5fef6c824f6ee9d30ec0e /src/com/android/launcher3/LauncherAnimUtils.java | |
parent | 3abe12e9330cbaab531369a03b40a4ac0c9c2478 (diff) | |
parent | f685c7e5f7750ddb1ca3d5f52343b92cb99fc130 (diff) | |
download | android_packages_apps_Trebuchet-1636cddbb48d0ad45028efa8756f205e78936261.tar.gz android_packages_apps_Trebuchet-1636cddbb48d0ad45028efa8756f205e78936261.tar.bz2 android_packages_apps_Trebuchet-1636cddbb48d0ad45028efa8756f205e78936261.zip |
resolved conflicts for f685c7e5 to ub-launcher3-master
Change-Id: Iddf78c166f9ab89ffae2ddc819c9ba5cf5e988be
Diffstat (limited to 'src/com/android/launcher3/LauncherAnimUtils.java')
-rw-r--r-- | src/com/android/launcher3/LauncherAnimUtils.java | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java index 853c2ec6b..01e73d4a1 100644 --- a/src/com/android/launcher3/LauncherAnimUtils.java +++ b/src/com/android/launcher3/LauncherAnimUtils.java @@ -55,24 +55,25 @@ public class LauncherAnimUtils { // it should be cancelled public static void startAnimationAfterNextDraw(final Animator animator, final View view) { view.getViewTreeObserver().addOnDrawListener(new ViewTreeObserver.OnDrawListener() { - private boolean mStarted = false; - public void onDraw() { - if (mStarted) return; - mStarted = true; - // Use this as a signal that the animation was cancelled - if (animator.getDuration() == 0) { - return; - } - animator.start(); - - final ViewTreeObserver.OnDrawListener listener = this; - view.post(new Runnable() { - public void run() { - view.getViewTreeObserver().removeOnDrawListener(listener); - } - }); + private boolean mStarted = false; + + public void onDraw() { + if (mStarted) return; + mStarted = true; + // Use this as a signal that the animation was cancelled + if (animator.getDuration() == 0) { + return; } - }); + animator.start(); + + final ViewTreeObserver.OnDrawListener listener = this; + view.post(new Runnable() { + public void run() { + view.getViewTreeObserver().removeOnDrawListener(listener); + } + }); + } + }); } public static void onDestroyActivity() { |