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

Commit d8c9adb7 authored by Jae Seo's avatar Jae Seo Committed by Android Git Automerger
Browse files

am 99a242c3: Merge "TIF: Always flush pending app-private commands when...

am 99a242c3: Merge "TIF: Always flush pending app-private commands when resetting TvView" into mnc-dev

* commit '99a242c3':
  TIF: Always flush pending app-private commands when resetting TvView
parents 99b3f7f3 99a242c3
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -337,8 +337,14 @@ public class TvView extends ViewGroup {
    }

    private void resetInternal() {
        mPendingAppPrivateCommands.clear();
        if (mSession != null) {
            release();
            setSessionSurface(null);
            removeSessionOverlayView();
            mUseRequestedSurfaceLayout = false;
            mSession.release();
            mSession = null;
            mSessionCallback = null;
            resetSurfaceView();
        }
    }
@@ -738,17 +744,6 @@ public class TvView extends ViewGroup {
        addView(mSurfaceView);
    }

    private void release() {
        mPendingAppPrivateCommands.clear();

        setSessionSurface(null);
        removeSessionOverlayView();
        mUseRequestedSurfaceLayout = false;
        mSession.release();
        mSession = null;
        mSessionCallback = null;
    }

    private void setSessionSurface(Surface surface) {
        if (mSession == null) {
            return;