diff options
author | Jaewan Kim <jaewan@google.com> | 2014-07-16 11:28:56 +0900 |
---|---|---|
committer | Youngsang Cho <youngsang@google.com> | 2014-07-18 11:11:38 -0700 |
commit | 903d6b72cd572665309633e925485464d08bb25a (patch) | |
tree | c5b2ee08c2733e8a5b4b70f0cf4a0d7adf8386ae /services | |
parent | 5598216931f7f5d42b7c062fdeb20b11ef853df8 (diff) | |
download | frameworks_base-903d6b72cd572665309633e925485464d08bb25a.zip frameworks_base-903d6b72cd572665309633e925485464d08bb25a.tar.gz frameworks_base-903d6b72cd572665309633e925485464d08bb25a.tar.bz2 |
TIF: Add unblock content
When a TV content is blocked by the parental control settings,
TV input service will notify TV to request user's PIN code verification.
If the verification succeeds, TV input service will be notified back
that content is unblocked so it can keep playing the content.
Bug: 13172379
Change-Id: I7b31d762eb54612c4d8779ee133211f32fb73b05
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/tv/TvInputManagerService.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 33a379a..4095757 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -980,6 +980,26 @@ public final class TvInputManagerService extends SystemService { } @Override + public void unblockContent(IBinder sessionToken, String unblockedRating, int userId) { + final int callingUid = Binder.getCallingUid(); + final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, + userId, "unblockContent"); + final long identity = Binder.clearCallingIdentity(); + try { + synchronized (mLock) { + try { + getSessionLocked(sessionToken, callingUid, resolvedUserId) + .unblockContent(unblockedRating); + } catch (RemoteException e) { + Slog.e(TAG, "error in unblockContent", e); + } + } + } finally { + Binder.restoreCallingIdentity(identity); + } + } + + @Override public void setCaptionEnabled(IBinder sessionToken, boolean enabled, int userId) { final int callingUid = Binder.getCallingUid(); final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, |