From b80d781f1dbe7b47af3be9d269542241d52e8a53 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 26 Apr 2016 17:42:42 -0700 Subject: [PATCH] Clear opaque flag when surface insets change. In addition to the pixel format there is an extra force opaque flag. We only update this on creation, but we need to respond to changing SurfaceInsets forcing an otherwise opaque surface to become translucent. Bug: 27364161 Change-Id: I13c69d1271412a0bc71e936867c58d5c413ab56b --- .../java/com/android/server/wm/WindowManagerService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index ff63632852297..30097ac898b5b 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2749,6 +2749,13 @@ public class WindowManagerService extends IWindowManager.Stub } win.setWindowScale(win.mRequestedWidth, win.mRequestedHeight); + if (win.mAttrs.surfaceInsets.left != 0 + || win.mAttrs.surfaceInsets.top != 0 + || win.mAttrs.surfaceInsets.right != 0 + || win.mAttrs.surfaceInsets.bottom != 0) { + winAnimator.setOpaqueLocked(false); + } + boolean imMayMove = (flagChanges & (FLAG_ALT_FOCUSABLE_IM | FLAG_NOT_FOCUSABLE)) != 0; final boolean isDefaultDisplay = win.isDefaultDisplay(); boolean focusMayChange = isDefaultDisplay && (win.mViewVisibility != viewVisibility