summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDongwon Kang <dwkang@google.com>2014-06-01 23:09:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-01 23:09:31 +0000
commit0bf8a21464d62857052cc033bf648077dbe20259 (patch)
tree1b50a691f2560593d964b29021997e8277d4cdf1 /services
parent377801463ef75d7c14f3ef6a346d8ddccb2a4045 (diff)
parent832860fb9f6b3a7188a6af2d5d67806593595800 (diff)
downloadframeworks_base-0bf8a21464d62857052cc033bf648077dbe20259.zip
frameworks_base-0bf8a21464d62857052cc033bf648077dbe20259.tar.gz
frameworks_base-0bf8a21464d62857052cc033bf648077dbe20259.tar.bz2
Merge "Add a path for generic event from a session to an application in Tv Input Framework." into lmp-preview-dev
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/tv/TvInputManagerService.java36
1 files changed, 36 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 6c38a4c..e52f218 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -33,6 +33,7 @@ import android.database.Cursor;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Binder;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -338,6 +339,41 @@ public final class TvInputManagerService extends SystemService {
channels[0].dispose();
}
}
+
+ @Override
+ public void onVideoSizeChanged(int width, int height) throws RemoteException {
+ synchronized (mLock) {
+ if (DEBUG) {
+ Slog.d(TAG, "onVideoSizeChanged(" + width + ", " + height + ")");
+ }
+ if (sessionState.mSession == null || sessionState.mClient == null) {
+ return;
+ }
+ try {
+ sessionState.mClient.onVideoSizeChanged(width, height, sessionState.mSeq);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "error in onSessionEvent");
+ }
+ }
+ }
+
+ @Override
+ public void onSessionEvent(String eventType, Bundle eventArgs) {
+ synchronized (mLock) {
+ if (DEBUG) {
+ Slog.d(TAG, "onEvent(what=" + eventType + ", data=" + eventArgs + ")");
+ }
+ if (sessionState.mSession == null || sessionState.mClient == null) {
+ return;
+ }
+ try {
+ sessionState.mClient.onSessionEvent(eventType, eventArgs,
+ sessionState.mSeq);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "error in onSessionEvent");
+ }
+ }
+ }
};
// Create a session. When failed, send a null token immediately.