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

Commit 2df19a23 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Fix a potential null-pointer onActivityDestroyed" into tm-qpr-dev

parents a5152338 bfde6b2e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -861,6 +861,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
        TaskUtils.closeSystemWindowsAsync(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);

        if (mRecentsView != null) {
            final View rv = mRecentsView;
            mRecentsView.getViewTreeObserver().addOnDrawListener(new OnDrawListener() {
                boolean mHandled = false;

@@ -876,8 +877,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
                    InteractionJankMonitorWrapper.begin(mRecentsView,
                            InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);

                    mRecentsView.post(() ->
                            mRecentsView.getViewTreeObserver().removeOnDrawListener(this));
                    rv.post(() -> rv.getViewTreeObserver().removeOnDrawListener(this));
                }
            });
        }