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

Commit f178c149 authored by Dongwon Kang's avatar Dongwon Kang Committed by Android (Google) Code Review
Browse files

Merge "TIF: fix NPE when notifyXXX is called on c-tor of Session implementation" into lmp-dev

parents 366b4234 c88b8f87
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1051,9 +1051,11 @@ public abstract class TvInputService extends Service {
        }

        private final void runOnMainThread(Runnable action) {
            if (mHandler.getLooper().isCurrentThread()) {
            if (mHandler.getLooper().isCurrentThread() && mSessionCallback != null) {
                action.run();
            } else {
                // Posts the runnable if this is not called from the main thread or the session
                // is not initialized yet.
                mHandler.post(action);
            }
        }