Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2cd6137 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "Check that ViewTreeObserver is alive before unregistering listener."""

parents 2653e624 ed77b454
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -436,7 +436,9 @@ public class NotificationShelf extends ActivatableNotificationView implements
                        public boolean onPreDraw() {
                            boolean animatingY = ViewState.isAnimatingY(icon);
                            if (!animatingY) {
                                if (observer.isAlive()) {
                                    observer.removeOnPreDrawListener(this);
                                }
                                icon.setTag(TAG_CONTINUOUS_CLIPPING, null);
                                return true;
                            }
@@ -453,7 +455,9 @@ public class NotificationShelf extends ActivatableNotificationView implements
                @Override
                public void onViewDetachedFromWindow(View v) {
                    if (v == icon) {
                        if (observer.isAlive()) {
                            observer.removeOnPreDrawListener(predrawListener);
                        }
                        icon.setTag(TAG_CONTINUOUS_CLIPPING, null);
                    }
                }