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

Commit 7af0ff9f authored by Baohe.Wang's avatar Baohe.Wang Committed by Jay Patel
Browse files

TvInputManagerService patch

Fix potential null pointer access at TvInputManagerService.java

Bug: 136411969
parent a367e0e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -840,6 +840,10 @@ public final class TvInputManagerService extends SystemService {
    private void setStateLocked(String inputId, int state, int userId) {
        UserState userState = getOrCreateUserStateLocked(userId);
        TvInputState inputState = userState.inputMap.get(inputId);
        if (inputState == null) {
            Slog.e(TAG, "failed to setStateLocked - unknown input id " + inputId);
            return;
        }
        ServiceState serviceState = userState.serviceStateMap.get(inputState.info.getComponent());
        int oldState = inputState.state;
        inputState.state = state;