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

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

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

parents c6426b0e b274079f
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);
                    }
                }