diff --git a/media/java/android/media/tv/ITvInputManager.aidl b/media/java/android/media/tv/ITvInputManager.aidl index 3ec7656dd3f23..0d51b5b508b84 100644 --- a/media/java/android/media/tv/ITvInputManager.aidl +++ b/media/java/android/media/tv/ITvInputManager.aidl @@ -87,7 +87,7 @@ interface ITvInputManager { void timeShiftEnablePositionTracking(in IBinder sessionToken, boolean enable, int userId); // For the recording session - void startRecording(in IBinder sessionToken, in Uri programHint, int userId); + void startRecording(in IBinder sessionToken, in Uri programUri, int userId); void stopRecording(in IBinder sessionToken, int userId); // For TV input hardware binding diff --git a/media/java/android/media/tv/ITvInputSession.aidl b/media/java/android/media/tv/ITvInputSession.aidl index b1ce8d4975f8e..356ec3cd1f11f 100644 --- a/media/java/android/media/tv/ITvInputSession.aidl +++ b/media/java/android/media/tv/ITvInputSession.aidl @@ -56,6 +56,6 @@ oneway interface ITvInputSession { void timeShiftEnablePositionTracking(boolean enable); // For the recording session - void startRecording(in Uri programHint); + void startRecording(in Uri programUri); void stopRecording(); } diff --git a/media/java/android/media/tv/ITvInputSessionWrapper.java b/media/java/android/media/tv/ITvInputSessionWrapper.java index 56103adc784de..07cfbda7ac2b6 100644 --- a/media/java/android/media/tv/ITvInputSessionWrapper.java +++ b/media/java/android/media/tv/ITvInputSessionWrapper.java @@ -352,8 +352,8 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand } @Override - public void startRecording(@Nullable Uri programHint) { - mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_START_RECORDING, programHint)); + public void startRecording(@Nullable Uri programUri) { + mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_START_RECORDING, programUri)); } @Override diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java index bfd938e4bfbdd..6f8134389259f 100644 --- a/media/java/android/media/tv/TvInputManager.java +++ b/media/java/android/media/tv/TvInputManager.java @@ -2082,16 +2082,16 @@ public final class TvInputManager { /** * Starts TV program recording in the current recording session. * - * @param programHint The URI for the TV program to record as a hint, built by + * @param programUri The URI for the TV program to record as a hint, built by * {@link TvContract#buildProgramUri(long)}. Can be {@code null}. */ - void startRecording(@Nullable Uri programHint) { + void startRecording(@Nullable Uri programUri) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { - mService.startRecording(mToken, programHint, mUserId); + mService.startRecording(mToken, programUri, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java index e1346351ba98d..ae0ebe8c53105 100644 --- a/media/java/android/media/tv/TvInputService.java +++ b/media/java/android/media/tv/TvInputService.java @@ -1717,8 +1717,8 @@ public abstract class TvInputService extends Service { * *
The application may supply the URI for a TV program for filling in program specific * data fields in the {@link android.media.tv.TvContract.RecordedPrograms} table. - * A non-null {@code programHint} implies the started recording should be of that specific - * program, whereas null {@code programHint} does not impose such a requirement and the + * A non-null {@code programUri} implies the started recording should be of that specific + * program, whereas null {@code programUri} does not impose such a requirement and the * recording can span across multiple TV programs. In either case, the application must call * {@link TvRecordingClient#stopRecording()} to stop the recording. * @@ -1783,8 +1783,8 @@ public abstract class TvInputService extends Service { * Calls {@link #onStartRecording(Uri)}. * */ - void startRecording(@Nullable Uri programHint) { - onStartRecording(programHint); + void startRecording(@Nullable Uri programUri) { + onStartRecording(programUri); } /** diff --git a/media/java/android/media/tv/TvRecordingClient.java b/media/java/android/media/tv/TvRecordingClient.java index 2613376cd1d1b..5aadeb6ecfa99 100644 --- a/media/java/android/media/tv/TvRecordingClient.java +++ b/media/java/android/media/tv/TvRecordingClient.java @@ -157,7 +157,7 @@ public class TvRecordingClient { * *
The application may supply the URI for a TV program for filling in program specific data * fields in the {@link android.media.tv.TvContract.RecordedPrograms} table. - * A non-null {@code programHint} implies the started recording should be of that specific + * A non-null {@code programUri} implies the started recording should be of that specific * program, whereas null {@code programUri} does not impose such a requirement and the * recording can span across multiple TV programs. In either case, the application must call * {@link TvRecordingClient#stopRecording()} to stop the recording. diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 30442bcba48f2..00bd4dec8696d 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -1555,7 +1555,7 @@ public final class TvInputManagerService extends SystemService { } @Override - public void startRecording(IBinder sessionToken, @Nullable Uri programHint, int userId) { + public void startRecording(IBinder sessionToken, @Nullable Uri programUri, int userId) { final int callingUid = Binder.getCallingUid(); final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, userId, "startRecording"); @@ -1564,7 +1564,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { try { getSessionLocked(sessionToken, callingUid, resolvedUserId).startRecording( - programHint); + programUri); } catch (RemoteException | SessionNotFoundException e) { Slog.e(TAG, "error in startRecording", e); }