summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJae Seo <jaeseo@google.com>2014-07-18 22:16:08 -0700
committerJae Seo <jaeseo@google.com>2014-07-20 19:16:15 -0700
commita759b111a1c9cb00284038f8a1554bf29709b952 (patch)
tree8b4ffb71df6e5d4e8083139cf7bf851692431f37 /services
parenta37cb8b6e3b48784e460d5d30bc3d827e3b4cafc (diff)
downloadframeworks_base-a759b111a1c9cb00284038f8a1554bf29709b952.zip
frameworks_base-a759b111a1c9cb00284038f8a1554bf29709b952.tar.gz
frameworks_base-a759b111a1c9cb00284038f8a1554bf29709b952.tar.bz2
TIF: Add sendAppPrivateCommand()
Added a way to send a private command from the application to the TV input. This can be used to provide domain-specific features that are only known between certain TV inputs and their clients. Change-Id: I7548311a64147b8ff27562ec680b941e2ec10bc0
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 0115366..c112b13 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -1116,6 +1116,27 @@ public final class TvInputManagerService extends SystemService {
}
@Override
+ public void sendAppPrivateCommand(IBinder sessionToken, String command, Bundle data,
+ int userId) {
+ final int callingUid = Binder.getCallingUid();
+ final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid,
+ userId, "sendAppPrivateCommand");
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ synchronized (mLock) {
+ try {
+ getSessionLocked(sessionToken, callingUid, resolvedUserId)
+ .appPrivateCommand(command, data);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "error in sendAppPrivateCommand", e);
+ }
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
public void createOverlayView(IBinder sessionToken, IBinder windowToken, Rect frame,
int userId) {
final int callingUid = Binder.getCallingUid();