OSDN Git Service

Fix issue #5470311: Activity with android:configChanges defined...
authorDianne Hackborn <hackbod@google.com>
Thu, 10 Nov 2011 19:19:57 +0000 (11:19 -0800)
committerDianne Hackborn <hackbod@google.com>
Thu, 10 Nov 2011 19:19:57 +0000 (11:19 -0800)
commit56b53b597f015fa73ca339deff62eadf287297ae
tree3fba2d4742b4f9f706ec327a8a407500ea29e04a
parente7de36e605e0ccf4552c8ee1db40cb9af3227cf4
Fix issue #5470311: Activity with android:configChanges defined...

...should not be restarted when rotating screen on xoom

This was a side-effect of a previous fix to compute the screen layout
config class based on the actual space available to the application, not
the raw display size.  On a device like Xoom, the system bar causes us
to switch between LONG and NOTLONG depending on whether the system bar
is on the short or long side of the screen.

To fix this, we now compute the screen layout class the same way
"smallest width" is computed: looking at all of the possible rotations
and using the smallest of them all.  In addition to preventing the device
from toggling between long and notlong on a Xoom-like screen, this will
also avoid other possible undersireable behavior like changing screen
layout size when rotating.

This does mean that Xoom is no longer considered a long screen even when
in landscape, because it is not a long screen in portrait.

Change-Id: I85f90a16294ef5a7de94d5b9231abbc6f914fe90
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
services/java/com/android/server/wm/WindowManagerService.java