summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDongwon Kang <dwkang@google.com>2014-06-26 17:59:27 +0900
committerDongwon Kang <dwkang@google.com>2014-07-08 14:46:20 +0900
commitb93ccca6139a7ee2dba5c110e5f8213a2bd231e5 (patch)
treec6499d21ff16c70f180fe2839c07194620859a73 /services
parent255edb556e289a53d1c62a700028c25dab90010e (diff)
downloadframeworks_base-b93ccca6139a7ee2dba5c110e5f8213a2bd231e5.zip
frameworks_base-b93ccca6139a7ee2dba5c110e5f8213a2bd231e5.tar.gz
frameworks_base-b93ccca6139a7ee2dba5c110e5f8213a2bd231e5.tar.bz2
Add onChannelRetuned callback in TV Input Framework.
Use cases: - Channel change from STB which is bound to a TV input. Bug: 14126559 Change-Id: Icddab61be6cb11162c03960fdb41fee8504bcd61
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/tv/TvInputManagerService.java21
1 files changed, 21 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 02dd1bf..bf767e2 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -485,6 +485,27 @@ public final class TvInputManagerService extends SystemService {
}
@Override
+ public void onChannelRetuned(Uri channelUri) {
+ synchronized (mLock) {
+ if (DEBUG) {
+ Slog.d(TAG, "onChannelRetuned(" + channelUri + ")");
+ }
+ if (sessionState.mSession == null || sessionState.mClient == null) {
+ return;
+ }
+ try {
+ // TODO: Consider adding this channel change in the watch log. When we do
+ // that, how we can protect the watch log from malicious tv inputs should
+ // be addressed. e.g. add a field which represents where the channel change
+ // originated from.
+ sessionState.mClient.onChannelRetuned(channelUri, sessionState.mSeq);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "error in onChannelRetuned");
+ }
+ }
+ }
+
+ @Override
public void onSessionEvent(String eventType, Bundle eventArgs) {
synchronized (mLock) {
if (DEBUG) {