OSDN Git Service

Rotation lock fix for sensor{Landscape,Portrait} activities.
authorDaniel Sandler <dsandler@google.com>
Tue, 22 Feb 2011 21:10:21 +0000 (16:10 -0500)
committerDaniel Sandler <dsandler@google.com>
Tue, 22 Feb 2011 21:10:23 +0000 (16:10 -0500)
commite7e5ac250ca6e682edc850a5148b6c46c4d2e060
tree167921da2a46e1d7cf5a04599030e9cf3471d74f
parent2ed6ad6aeca5f9829ea7dad4e092064ee4baad47
Rotation lock fix for sensor{Landscape,Portrait} activities.

E.g. if an app is sensorLandscape and the device rotation is
locked to landscape, the activity should not be allowed to
flip to seascape even if the device is inverted.

If the rotation is locked 90° from the activity's
supported orientations, we must override the lock as before,
but we now suppress the sensor input (confining the activity
to one of its two orientations). This best preserves the
spirit of the rotation lock while still allowing the
activity to run in a supported configuration.

Bug: 3453407
Change-Id: I8ee255e0250ba7e4534f4622ac37b82d31cf9936
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java