From 8d0243a3d0269d3a57d90eb2e7b12b41f53b27d9 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 24 Sep 2012 15:01:47 -0700 Subject: Fix surface view on secondary display. Bug: 7183618 Change-Id: I8d743b5db8f362afb97f720846d990f9a722b3bd --- core/java/android/view/SurfaceView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/java') diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 973c7f6..3be63d5 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -456,11 +456,12 @@ public class SurfaceView extends View { } if (mWindow == null) { + Display display = getDisplay(); mWindow = new MyWindow(this); mLayout.type = mWindowType; mLayout.gravity = Gravity.START|Gravity.TOP; mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout, - mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets); + mVisible ? VISIBLE : GONE, display.getDisplayId(), mContentInsets); } boolean realSizeChanged; -- cgit v1.1