OSDN Git Service

Coordinate configuration changes and window frame size.
authorBryce Lee <brycelee@google.com>
Thu, 27 Apr 2017 20:42:23 +0000 (13:42 -0700)
committerBryce Lee <brycelee@google.com>
Tue, 6 Jun 2017 03:55:46 +0000 (20:55 -0700)
commitafb45bba8379df530182dae882ec70329423dcfe
tree2c744d0edf25f7e8b4ad7247d60f1aa8661e4d0d
parent71044d6ba18e89b055c7b37a7228a554f15e7eea
Coordinate configuration changes and window frame size.

Previously, it was possible for the view hierarchy to be measured,
laid out, and drawn around a window frame size that did not match
the current configuration. This stems from new configurations not
always propagating back from WindowSession#relayout, which is
called from ViewRootImpl.

This changelist makes WindowManagerService#relayoutWindow always
return the latest configuration. It also adds rotation to the
configuration.

Fixes: 32839232
Test: go/wm-smoke
Test: Open Camera while rotating phone to landscape. Added
      temporary logs to detect inconsistencies between measurements
      and reported rotation on draw.
Change-Id: I39daca338b4f87eff1a509eb99493f01e710ced1
core/java/android/content/res/Configuration.java
core/java/android/view/IWindowSession.aidl
core/java/android/view/Surface.java
core/java/android/view/ViewRootImpl.java
services/core/java/com/android/server/wm/DisplayContent.java
services/core/java/com/android/server/wm/WindowState.java