summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJae Seo <jaeseo@google.com>2015-05-12 05:21:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-12 05:21:27 +0000
commit8ef4a3c9c0dd60bf8b0c959123d0afe1a62a153e (patch)
treebde0e371d9e485359115f0c7bbac67d4a45dae2e /media
parentb9e26621ba46580c9208fde94260666558f81ab9 (diff)
parenta90338396c90f19b062b696cdb1ffcb8600755b2 (diff)
downloadframeworks_base-8ef4a3c9c0dd60bf8b0c959123d0afe1a62a153e.zip
frameworks_base-8ef4a3c9c0dd60bf8b0c959123d0afe1a62a153e.tar.gz
frameworks_base-8ef4a3c9c0dd60bf8b0c959123d0afe1a62a153e.tar.bz2
Merge "TIF: Rename requestUnblockContent to unblockContent" into mnc-dev
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/tv/ITvInputManager.aidl2
-rw-r--r--media/java/android/media/tv/ITvInputSession.aidl2
-rw-r--r--media/java/android/media/tv/ITvInputSessionWrapper.java8
-rw-r--r--media/java/android/media/tv/TvInputManager.java4
-rw-r--r--media/java/android/media/tv/TvView.java18
5 files changed, 25 insertions, 9 deletions
diff --git a/media/java/android/media/tv/ITvInputManager.aidl b/media/java/android/media/tv/ITvInputManager.aidl
index b6491d8..078fb2f 100644
--- a/media/java/android/media/tv/ITvInputManager.aidl
+++ b/media/java/android/media/tv/ITvInputManager.aidl
@@ -72,7 +72,7 @@ interface ITvInputManager {
void relayoutOverlayView(in IBinder sessionToken, in Rect frame, int userId);
void removeOverlayView(in IBinder sessionToken, int userId);
- void requestUnblockContent(in IBinder sessionToken, in String unblockedRating, int userId);
+ void unblockContent(in IBinder sessionToken, in String unblockedRating, int userId);
void timeShiftPause(in IBinder sessionToken, int userId);
void timeShiftResume(in IBinder sessionToken, int userId);
diff --git a/media/java/android/media/tv/ITvInputSession.aidl b/media/java/android/media/tv/ITvInputSession.aidl
index a054200..17f3984 100644
--- a/media/java/android/media/tv/ITvInputSession.aidl
+++ b/media/java/android/media/tv/ITvInputSession.aidl
@@ -45,7 +45,7 @@ oneway interface ITvInputSession {
void relayoutOverlayView(in Rect frame);
void removeOverlayView();
- void requestUnblockContent(in String unblockedRating);
+ void unblockContent(in String unblockedRating);
void timeShiftPause();
void timeShiftResume();
diff --git a/media/java/android/media/tv/ITvInputSessionWrapper.java b/media/java/android/media/tv/ITvInputSessionWrapper.java
index 95aaa7f..0191652 100644
--- a/media/java/android/media/tv/ITvInputSessionWrapper.java
+++ b/media/java/android/media/tv/ITvInputSessionWrapper.java
@@ -57,7 +57,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
private static final int DO_CREATE_OVERLAY_VIEW = 10;
private static final int DO_RELAYOUT_OVERLAY_VIEW = 11;
private static final int DO_REMOVE_OVERLAY_VIEW = 12;
- private static final int DO_REQUEST_UNBLOCK_CONTENT = 13;
+ private static final int DO_UNBLOCK_CONTENT = 13;
private static final int DO_TIME_SHIFT_PAUSE = 14;
private static final int DO_TIME_SHIFT_RESUME = 15;
private static final int DO_TIME_SHIFT_SEEK_TO = 16;
@@ -155,7 +155,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
mTvInputSessionImpl.removeOverlayView(true);
break;
}
- case DO_REQUEST_UNBLOCK_CONTENT: {
+ case DO_UNBLOCK_CONTENT: {
mTvInputSessionImpl.unblockContent((String) msg.obj);
break;
}
@@ -267,9 +267,9 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
}
@Override
- public void requestUnblockContent(String unblockedRating) {
+ public void unblockContent(String unblockedRating) {
mCaller.executeOrSendMessage(mCaller.obtainMessageO(
- DO_REQUEST_UNBLOCK_CONTENT, unblockedRating));
+ DO_UNBLOCK_CONTENT, unblockedRating));
}
@Override
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 8c06f15..705aa3d6 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -1820,14 +1820,14 @@ public final class TvInputManager {
/**
* Requests to unblock content blocked by parental controls.
*/
- void requestUnblockContent(@NonNull TvContentRating unblockedRating) {
+ void unblockContent(@NonNull TvContentRating unblockedRating) {
Preconditions.checkNotNull(unblockedRating);
if (mToken == null) {
Log.w(TAG, "The session has been already released");
return;
}
try {
- mService.requestUnblockContent(mToken, unblockedRating.flattenToString(), mUserId);
+ mService.unblockContent(mToken, unblockedRating.flattenToString(), mUserId);
} catch (RemoteException e) {
throw new RuntimeException(e);
}
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index 7e64b17..ebe281f 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -350,11 +350,27 @@ public class TvView extends ViewGroup {
* @param unblockedRating A TvContentRating to unblock.
* @see TvInputService.Session#notifyContentBlocked(TvContentRating)
* @hide
+ * @deprecated Use {@link #unblockContent} instead.
*/
+ @Deprecated
@SystemApi
public void requestUnblockContent(TvContentRating unblockedRating) {
+ unblockContent(unblockedRating);
+ }
+
+ /**
+ * Requests to unblock TV content according to the given rating.
+ *
+ * <p>This notifies TV input that blocked content is now OK to play.
+ *
+ * @param unblockedRating A TvContentRating to unblock.
+ * @see TvInputService.Session#notifyContentBlocked(TvContentRating)
+ * @hide
+ */
+ @SystemApi
+ public void unblockContent(TvContentRating unblockedRating) {
if (mSession != null) {
- mSession.requestUnblockContent(unblockedRating);
+ mSession.unblockContent(unblockedRating);
}
}