From e821d711db1799dc51661a3ed6188f3cd942bae7 Mon Sep 17 00:00:00 2001 From: Youngsang Cho Date: Wed, 16 Jul 2014 14:22:19 -0700 Subject: TIF: Add a notification for surface change from TvView to TvInputService Bug: 15447352 Change-Id: I3e91609c5eb03be84cc7c88507457b9e74750de8 --- .../android/server/tv/TvInputManagerService.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'services') diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 20fdefa..a6887fb 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -816,6 +816,27 @@ public final class TvInputManagerService extends SystemService { } @Override + public void dispatchSurfaceChanged(IBinder sessionToken, int format, int width, + int height, int userId) { + final int callingUid = Binder.getCallingUid(); + final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, + userId, "dispatchSurfaceChanged"); + final long identity = Binder.clearCallingIdentity(); + try { + synchronized (mLock) { + try { + getSessionLocked(sessionToken, callingUid, resolvedUserId) + .dispatchSurfaceChanged(format, width, height); + } catch (RemoteException e) { + Slog.e(TAG, "error in dispatchSurfaceChanged", e); + } + } + } finally { + Binder.restoreCallingIdentity(identity); + } + } + + @Override public void setVolume(IBinder sessionToken, float volume, int userId) { final int callingUid = Binder.getCallingUid(); final int resolvedUserId = resolveCallingUserId(Binder.getCallingPid(), callingUid, -- cgit v1.1