Skip to content

Commit 8d0243a

Browse files
author
Jeff Brown
committed
Fix surface view on secondary display.
Bug: 7183618 Change-Id: I8d743b5db8f362afb97f720846d990f9a722b3bd
1 parent 14a9f2b commit 8d0243a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/view/SurfaceView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,12 @@ private void updateWindow(boolean force, boolean redrawNeeded) {
456456
}
457457

458458
if (mWindow == null) {
459+
Display display = getDisplay();
459460
mWindow = new MyWindow(this);
460461
mLayout.type = mWindowType;
461462
mLayout.gravity = Gravity.START|Gravity.TOP;
462463
mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout,
463-
mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets);
464+
mVisible ? VISIBLE : GONE, display.getDisplayId(), mContentInsets);
464465
}
465466

466467
boolean realSizeChanged;

0 commit comments

Comments
 (0)