diff options
author | Dongwon Kang <dwkang@google.com> | 2014-06-01 23:09:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-01 23:09:31 +0000 |
commit | 0bf8a21464d62857052cc033bf648077dbe20259 (patch) | |
tree | 1b50a691f2560593d964b29021997e8277d4cdf1 /services | |
parent | 377801463ef75d7c14f3ef6a346d8ddccb2a4045 (diff) | |
parent | 832860fb9f6b3a7188a6af2d5d67806593595800 (diff) | |
download | frameworks_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.java | 36 |
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. |