Loading services/core/java/com/android/server/tv/TvInputManagerService.java +8 −13 Original line number Diff line number Diff line Loading @@ -1224,7 +1224,7 @@ public final class TvInputManagerService extends SystemService { try { synchronized (mLock) { if (userId != mCurrentUserId && !isRecordingSession) { // A non-recording session of a backgroud (non-current) user // A non-recording session of a background (non-current) user // should not be created. // Let the client get onConnectionFailed callback for this case. sendSessionTokenToClientLocked(client, inputId, null, null, seq); Loading Loading @@ -2028,10 +2028,8 @@ public final class TvInputManagerService extends SystemService { SessionState[] sessionStates = userState.sessionStateMap.values().toArray( new SessionState[2]); // Check if there is a wrapper input. if (sessionStates[0].hardwareSessionToken != null || sessionStates[1].hardwareSessionToken != null) { return true; } return sessionStates[0].hardwareSessionToken != null || sessionStates[1].hardwareSessionToken != null; } return false; } Loading Loading @@ -2111,7 +2109,7 @@ public final class TvInputManagerService extends SystemService { * Add a hardware device in the TvInputHardwareManager for CTS testing * purpose. * * @param device id of the adding hardware device. * @param deviceId the id of the adding hardware device. */ @Override public void addHardwareDevice(int deviceId) { Loading @@ -2123,14 +2121,13 @@ public final class TvInputManagerService extends SystemService { .hdmiPortId(0) .build(); mTvInputHardwareManager.onDeviceAvailable(info, null); return; } /** * Remove a hardware device in the TvInputHardwareManager for CTS testing * purpose. * * @param device id of the removing hardware device. * @param deviceId the id of the removing hardware device. */ @Override public void removeHardwareDevice(int deviceId) { Loading Loading @@ -2254,7 +2251,6 @@ public final class TvInputManagerService extends SystemService { pw.println("userId: " + session.userId); pw.println("sessionToken: " + session.sessionToken); pw.println("session: " + session.session); pw.println("logUri: " + session.logUri); pw.println("hardwareSessionToken: " + session.hardwareSessionToken); pw.decreaseIndent(); } Loading @@ -2264,7 +2260,7 @@ public final class TvInputManagerService extends SystemService { pw.increaseIndent(); int n = userState.mCallbacks.beginBroadcast(); for (int j = 0; j < n; ++j) { pw.println(userState.mCallbacks.getRegisteredCallbackItem(j).toString()); pw.println(userState.mCallbacks.getRegisteredCallbackItem(j)); } userState.mCallbacks.finishBroadcast(); pw.decreaseIndent(); Loading Loading @@ -2363,7 +2359,7 @@ public final class TvInputManagerService extends SystemService { // A list of callbacks. private final RemoteCallbackList<ITvInputManagerCallback> mCallbacks = new RemoteCallbackList<ITvInputManagerCallback>(); new RemoteCallbackList<>(); private final Map<ITvInputManagerCallback, Pair<Integer, Integer>> callbackPidUidMap = new HashMap<>(); Loading Loading @@ -2474,7 +2470,6 @@ public final class TvInputManagerService extends SystemService { private final int userId; private final IBinder sessionToken; private ITvInputSession session; private Uri logUri; // Not null if this session represents an external device connected to a hardware TV input. private IBinder hardwareSessionToken; Loading Loading @@ -3024,7 +3019,7 @@ public final class TvInputManagerService extends SystemService { IBinder sessionToken = (IBinder) args.arg5; ContentValues values = new ContentValues(); values.put(TvContract.WatchedPrograms.COLUMN_PACKAGE_NAME, packageName); values.put(TvContract.BaseTvColumns.COLUMN_PACKAGE_NAME, packageName); values.put(TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, watchStartTime); values.put(TvContract.WatchedPrograms.COLUMN_CHANNEL_ID, channelId); Loading Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +8 −13 Original line number Diff line number Diff line Loading @@ -1224,7 +1224,7 @@ public final class TvInputManagerService extends SystemService { try { synchronized (mLock) { if (userId != mCurrentUserId && !isRecordingSession) { // A non-recording session of a backgroud (non-current) user // A non-recording session of a background (non-current) user // should not be created. // Let the client get onConnectionFailed callback for this case. sendSessionTokenToClientLocked(client, inputId, null, null, seq); Loading Loading @@ -2028,10 +2028,8 @@ public final class TvInputManagerService extends SystemService { SessionState[] sessionStates = userState.sessionStateMap.values().toArray( new SessionState[2]); // Check if there is a wrapper input. if (sessionStates[0].hardwareSessionToken != null || sessionStates[1].hardwareSessionToken != null) { return true; } return sessionStates[0].hardwareSessionToken != null || sessionStates[1].hardwareSessionToken != null; } return false; } Loading Loading @@ -2111,7 +2109,7 @@ public final class TvInputManagerService extends SystemService { * Add a hardware device in the TvInputHardwareManager for CTS testing * purpose. * * @param device id of the adding hardware device. * @param deviceId the id of the adding hardware device. */ @Override public void addHardwareDevice(int deviceId) { Loading @@ -2123,14 +2121,13 @@ public final class TvInputManagerService extends SystemService { .hdmiPortId(0) .build(); mTvInputHardwareManager.onDeviceAvailable(info, null); return; } /** * Remove a hardware device in the TvInputHardwareManager for CTS testing * purpose. * * @param device id of the removing hardware device. * @param deviceId the id of the removing hardware device. */ @Override public void removeHardwareDevice(int deviceId) { Loading Loading @@ -2254,7 +2251,6 @@ public final class TvInputManagerService extends SystemService { pw.println("userId: " + session.userId); pw.println("sessionToken: " + session.sessionToken); pw.println("session: " + session.session); pw.println("logUri: " + session.logUri); pw.println("hardwareSessionToken: " + session.hardwareSessionToken); pw.decreaseIndent(); } Loading @@ -2264,7 +2260,7 @@ public final class TvInputManagerService extends SystemService { pw.increaseIndent(); int n = userState.mCallbacks.beginBroadcast(); for (int j = 0; j < n; ++j) { pw.println(userState.mCallbacks.getRegisteredCallbackItem(j).toString()); pw.println(userState.mCallbacks.getRegisteredCallbackItem(j)); } userState.mCallbacks.finishBroadcast(); pw.decreaseIndent(); Loading Loading @@ -2363,7 +2359,7 @@ public final class TvInputManagerService extends SystemService { // A list of callbacks. private final RemoteCallbackList<ITvInputManagerCallback> mCallbacks = new RemoteCallbackList<ITvInputManagerCallback>(); new RemoteCallbackList<>(); private final Map<ITvInputManagerCallback, Pair<Integer, Integer>> callbackPidUidMap = new HashMap<>(); Loading Loading @@ -2474,7 +2470,6 @@ public final class TvInputManagerService extends SystemService { private final int userId; private final IBinder sessionToken; private ITvInputSession session; private Uri logUri; // Not null if this session represents an external device connected to a hardware TV input. private IBinder hardwareSessionToken; Loading Loading @@ -3024,7 +3019,7 @@ public final class TvInputManagerService extends SystemService { IBinder sessionToken = (IBinder) args.arg5; ContentValues values = new ContentValues(); values.put(TvContract.WatchedPrograms.COLUMN_PACKAGE_NAME, packageName); values.put(TvContract.BaseTvColumns.COLUMN_PACKAGE_NAME, packageName); values.put(TvContract.WatchedPrograms.COLUMN_WATCH_START_TIME_UTC_MILLIS, watchStartTime); values.put(TvContract.WatchedPrograms.COLUMN_CHANNEL_ID, channelId); Loading