diff options
author | Youngsang Cho <youngsang@google.com> | 2014-05-21 20:54:03 +0900 |
---|---|---|
committer | Dongwon Kang <dwkang@google.com> | 2014-05-29 21:04:52 -0700 |
commit | 832860fb9f6b3a7188a6af2d5d67806593595800 (patch) | |
tree | 1e4c22742eb689b0f0cc151dda761fd21581808c /services | |
parent | 2070252f988e4daac08acf88ea6865138d899f75 (diff) | |
download | frameworks_base-832860fb9f6b3a7188a6af2d5d67806593595800.zip frameworks_base-832860fb9f6b3a7188a6af2d5d67806593595800.tar.gz frameworks_base-832860fb9f6b3a7188a6af2d5d67806593595800.tar.bz2 |
Add a path for generic event from a session to an application in Tv Input Framework.
Plus, Video size changed event is also added.
Bug: 14126559
Change-Id: I04c553481fbaf8d92adbcc34f3c9d26acc87b361
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. |