OSDN Git Service

Update DisplayMetrics when resizing
authorAdam Lesinski <adamlesinski@google.com>
Fri, 24 Jun 2016 19:29:16 +0000 (12:29 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Fri, 24 Jun 2016 22:11:27 +0000 (22:11 +0000)
commitac3e0e590a7b425af20e2ac70569ced789155dde
tree7baad0684bb67431208f14ca4660d36f6dc9a31c
parentc63710ea4849aba6d30807b7f38a122a6176aa49
Update DisplayMetrics when resizing

Previously the DisplayMetrics passed to a new ResourcesImpl
object would be generated from the default DisplayAdjustments.
We now use the correct DisplayAdjustments for the ResourcesImpl
and make sure to update them for things like rotation changes.

Bug:29619314
Change-Id: If2ba0d7670a4554dcd3fde9766e2337f20a191fd
(cherry picked from commit 8e8d23214a71d8813ebd3676b192924c530cb913)
core/java/android/app/ResourcesManager.java
core/java/android/content/res/Resources.java
core/java/android/content/res/ResourcesImpl.java
core/java/android/view/DisplayAdjustments.java
core/tests/coretests/src/android/content/res/ResourcesManagerTest.java