Lines Matching defs:SessionState
405 for (SessionState state : userState.sessionStateMap.values()) {
459 private SessionState getSessionStateLocked(IBinder sessionToken, int callingUid, int userId) {
461 SessionState sessionState = userState.sessionStateMap.get(sessionToken);
462 if (sessionState == null) {
466 if (callingUid != Process.SYSTEM_UID && callingUid != sessionState.callingUid) {
470 return sessionState;
477 private ITvInputSession getSessionLocked(SessionState sessionState) {
478 ITvInputSession session = sessionState.session;
481 + sessionState.sessionToken);
541 List<SessionState> sessionsToAbort = new ArrayList<>();
543 SessionState sessionState = userState.sessionStateMap.get(sessionToken);
544 if (sessionState.session == null && (inputId == null
545 || sessionState.info.getId().equals(inputId))) {
546 sessionsToAbort.add(sessionState);
549 for (SessionState sessionState : sessionsToAbort) {
550 removeSessionStateLocked(sessionState.sessionToken, sessionState.userId);
551 sendSessionTokenToClientLocked(sessionState.client,
552 sessionState.info.getId(), null, null, sessionState.seq);
560 SessionState sessionState = userState.sessionStateMap.get(sessionToken);
562 Slog.d(TAG, "createSessionInternalLocked(inputId=" + sessionState.info.getId() + ")");
567 ITvInputSessionCallback callback = new SessionCallback(sessionState, channels);
571 service.createSession(channels[1], callback, sessionState.info.getId());
575 sendSessionTokenToClientLocked(sessionState.client, sessionState.info.getId(), null,
576 null, sessionState.seq);
591 SessionState sessionState = getSessionStateLocked(sessionToken, callingUid, userId);
592 if (sessionState.session != null) {
598 sessionState.session.release();
602 sessionState.session = null;
617 SessionState sessionState = userState.sessionStateMap.remove(sessionToken);
619 if (sessionState == null) {
625 ClientState clientState = userState.clientStateMap.get(sessionState.client.asBinder());
629 userState.clientStateMap.remove(sessionState.client.asBinder());
633 TvInputInfo info = sessionState.info;
640 updateServiceConnectionLocked(sessionState.info.getComponent(), userId);
650 SessionState sessionState = getSessionStateLocked(sessionToken, callingUid, userId);
651 if (sessionState.hardwareSessionToken != null) {
652 sessionState = getSessionStateLocked(sessionState.hardwareSessionToken,
655 ServiceState serviceState = getServiceStateLocked(sessionState.info.getComponent(), userId);
659 ITvInputSession session = getSessionLocked(sessionState);
984 SessionState sessionState = new SessionState(sessionToken, info, client,
988 userState.sessionStateMap.put(sessionToken, sessionState);
1067 SessionState sessionState = getSessionStateLocked(sessionToken, callingUid,
1069 if (sessionState.hardwareSessionToken == null) {
1070 getSessionLocked(sessionState).setSurface(surface);
1072 getSessionLocked(sessionState.hardwareSessionToken,
1098 SessionState sessionState = getSessionStateLocked(sessionToken, callingUid,
1100 getSessionLocked(sessionState).dispatchSurfaceChanged(format, width,
1102 if (sessionState.hardwareSessionToken != null) {
1103 getSessionLocked(sessionState.hardwareSessionToken, Process.SYSTEM_UID,
1126 SessionState sessionState = getSessionStateLocked(sessionToken, callingUid,
1128 getSessionLocked(sessionState).setVolume(volume);
1129 if (sessionState.hardwareSessionToken != null) {
1132 getSessionLocked(sessionState.hardwareSessionToken,
1162 SessionState sessionState = userState.sessionStateMap.get(sessionToken);
1166 args.arg1 = sessionState.info.getComponent().getPackageName();
1425 for (SessionState sessionState : userState.sessionStateMap.values()) {
1426 if (sessionState.info.getId().equals(inputId)
1427 && sessionState.hardwareSessionToken != null) {
1429 sessionState.hardwareSessionToken).info.getId();
1455 SessionState[] sessionStates = userState.sessionStateMap.values().toArray(
1456 new SessionState[0]);
1558 pw.println("sessionStateMap: ITvInputSession -> SessionState");
1560 for (Map.Entry<IBinder, SessionState> entry :
1562 SessionState session = entry.getValue();
1613 private final Map<IBinder, SessionState> sessionStateMap =
1614 new HashMap<IBinder, SessionState>();
1697 private final class SessionState implements IBinder.DeathRecipient {
1709 private SessionState(IBinder sessionToken, TvInputInfo info, ITvInputClient client,
1732 for (SessionState sessionState : userState.sessionStateMap.values()) {
1733 if (sessionToken == sessionState.hardwareSessionToken) {
1734 releaseSessionLocked(sessionState.sessionToken, Process.SYSTEM_UID,
1737 sessionState.client.onSessionReleased(sessionState.seq);
1918 private final SessionState mSessionState;
1921 SessionCallback(SessionState sessionState, InputChannel[] channels) {
1922 mSessionState = sessionState;