OSDN Git Service

TIF: Add TvParentalControlManager
authorJae Seo <jaeseo@google.com>
Mon, 14 Jul 2014 23:07:19 +0000 (16:07 -0700)
committerJae Seo <jaeseo@google.com>
Thu, 17 Jul 2014 23:29:36 +0000 (16:29 -0700)
commit6057102dbb746593a7d59cf377c969b62e38c664
treea146b1d3e7e953aeee8bbd122f7dcb586db4fd45
parentf83ccb964796ee9b2eca2e50fdf652f3aff0e333
TIF: Add TvParentalControlManager

Each TV input service is now required to query the system whether the
user is allowed to watch the current program before showing it to the
user if the parental control is turned on, which can be checked by
calling TvParentalControlManager.isEnabled(). Whether the TV input
service should block the content or not is determined by invoking
TvParentalControlManager.isRatingBlocked() with the content rating for
the current program. Then the TvParentalControlManager makes a judgment
based on the user blocked ratings stored in the secure settings and
returns the result. If the rating in question turns out to be blocked,
the TV input service must immediately block the content and call this
method with the content rating of the current program to prompt the PIN
verification screen.

Each TV input service also needs to continuously listen to any changes
made to the parental control settings by registering a
TvParentalControlManager.ParentalControlCallback() to the manager and
immediately reevaluate the current program with the new parental control
settings.

Bug: 13172379
Change-Id: I8e1900d4b8d28c56798986d5c3906bd418ab97ac
12 files changed:
api/current.txt
core/java/android/app/ContextImpl.java
core/java/android/content/Context.java
core/java/android/provider/Settings.java
media/java/android/media/tv/ITvInputClient.aidl
media/java/android/media/tv/ITvInputSessionCallback.aidl
media/java/android/media/tv/TvContentRating.java
media/java/android/media/tv/TvInputManager.java
media/java/android/media/tv/TvInputService.java
media/java/android/media/tv/TvParentalControlManager.java [new file with mode: 0644]
media/java/android/media/tv/TvView.java
services/core/java/com/android/server/tv/TvInputManagerService.java