summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/Launcher.java1
-rw-r--r--src/com/android/launcher3/TransitionEffectsFragment.java12
2 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 937a167..3657093 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1359,6 +1359,7 @@ public class Launcher extends Activity
}
fragmentTransaction
.remove(mTransitionEffectsFragment).commit();
+ mTransitionEffectsFragment = null;
mDarkPanel.setVisibility(View.VISIBLE);
ObjectAnimator anim = ObjectAnimator.ofFloat(
diff --git a/src/com/android/launcher3/TransitionEffectsFragment.java b/src/com/android/launcher3/TransitionEffectsFragment.java
index d490a00..5fb5d22 100644
--- a/src/com/android/launcher3/TransitionEffectsFragment.java
+++ b/src/com/android/launcher3/TransitionEffectsFragment.java
@@ -153,6 +153,18 @@ public class TransitionEffectsFragment extends Fragment {
frameAnimation.start();
}
+ @Override
+ public void onStop() {
+ super.onStop();
+
+ // explicitly stop animation to ensure that we release references from the
+ // view root's run queue
+ AnimationDrawable frameAnimation = (AnimationDrawable) mTransitionIcon.getBackground();
+ if (frameAnimation != null) {
+ frameAnimation.stop();
+ }
+ }
+
private void setSelected(View v) {
v.setBackgroundColor(Color.WHITE);
TextView t = (TextView) v.findViewById(R.id.item_name);