Loading core/java/android/tv/TvInputService.java +9 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ public abstract class TvInputService extends Service { private final KeyEvent.DispatcherState mDispatcherState = new KeyEvent.DispatcherState(); private final WindowManager mWindowManager; private WindowManager.LayoutParams mWindowParams; private Surface mSurface; private View mOverlayView; private boolean mOverlayViewEnabled; private IBinder mWindowToken; Loading Loading @@ -346,6 +347,10 @@ public abstract class TvInputService extends Service { */ void release() { onRelease(); if (mSurface != null) { mSurface.release(); mSurface = null; } removeOverlayView(true); } Loading @@ -354,6 +359,10 @@ public abstract class TvInputService extends Service { */ void setSurface(Surface surface) { onSetSurface(surface); if (mSurface != null) { mSurface.release(); } mSurface = surface; // TODO: Handle failure. } Loading services/core/java/com/android/server/tv/TvInputManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,10 @@ public final class TvInputManagerService extends SystemService { } } } finally { if (surface != null) { // surface is not used in TvInputManagerService. surface.release(); } Binder.restoreCallingIdentity(identity); } } Loading Loading
core/java/android/tv/TvInputService.java +9 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ public abstract class TvInputService extends Service { private final KeyEvent.DispatcherState mDispatcherState = new KeyEvent.DispatcherState(); private final WindowManager mWindowManager; private WindowManager.LayoutParams mWindowParams; private Surface mSurface; private View mOverlayView; private boolean mOverlayViewEnabled; private IBinder mWindowToken; Loading Loading @@ -346,6 +347,10 @@ public abstract class TvInputService extends Service { */ void release() { onRelease(); if (mSurface != null) { mSurface.release(); mSurface = null; } removeOverlayView(true); } Loading @@ -354,6 +359,10 @@ public abstract class TvInputService extends Service { */ void setSurface(Surface surface) { onSetSurface(surface); if (mSurface != null) { mSurface.release(); } mSurface = surface; // TODO: Handle failure. } Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,10 @@ public final class TvInputManagerService extends SystemService { } } } finally { if (surface != null) { // surface is not used in TvInputManagerService. surface.release(); } Binder.restoreCallingIdentity(identity); } } Loading