OSDN Git Service

Use privateFlags for the preserve geometry check
authorJohan Redestig <johan.redestig@sonymobile.com>
Fri, 11 Mar 2016 10:13:16 +0000 (11:13 +0100)
committerRobert Carr <racarr@google.com>
Mon, 14 Mar 2016 19:52:49 +0000 (12:52 -0700)
PRIVATE_FLAG_PRESERVE_GEOMETRY flag is set to privateFlag, thus this
path wasn't really used triggering side-effects with SurfaceView
placement.

Bug: 27607148
Author: Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>
Change-Id: Ic2708bbcc9c2ab1cfaf324b6fd539a1ad027429c

services/core/java/com/android/server/wm/WindowManagerService.java

index b64aaa8..dab76ca 100644 (file)
@@ -2621,7 +2621,8 @@ public class WindowManagerService extends IWindowManager.Stub
                 }
 
                 // Odd choice but less odd than embedding in copyFrom()
-                if ((attrs.flags & WindowManager.LayoutParams.PRIVATE_FLAG_PRESERVE_GEOMETRY) != 0) {
+                if ((attrs.privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_PRESERVE_GEOMETRY)
+                        != 0) {
                     attrs.x = win.mAttrs.x;
                     attrs.y = win.mAttrs.y;
                     attrs.width = win.mAttrs.width;