Bug: 4981385
Simplify the orientation changing code path in the
WindowManager. Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out. For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.
Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.
Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes. The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.
Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise. We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.
Delete dead code related to animFlags.
Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened. We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.
Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
Settings were restore in alphabetical order and capturing dependency
among them required keys to be chosen in such a way that after sorting
they apprear in dependency order. Now settings are exported and restored
in the order they are declared in the arrays of settings to backup.
Hence, the order in this array will capture the dependency order.
bug:5343351
Change-Id: I93a40bcdd194943cd6f85aa18f1557d546e38274
ActionProviders (or action views) unfortunately had no way to report
that they had opened a sub-UI that would affect menu visibility
listeners used to hide action bars when not in use. This caused the
Gallery UI to hide its action bar when the share popup was open.
Add hidden API (to be made public later) to ActionProvider that can be
used to inform the menu system that a sub UI has opened or
closed. Account for this in menu visibility callbacks. Fix
ShareActionProvider to use this when its popup windows open and close.
Fix a regression where submenus were not properly reporting visibility
changes.
Change-Id: Ia6f45fb463ad106105c40d01f141c2e5c8b96f78
Make pukUnlockScreen the default way to enter PUK ocde.
There are two ways to enter PUK code, pukUnlockScreen UI
and MMI Code for Emergency Dialer. As far as we know most
of carriers are fine with either one though they may prefer
pukUnlockScreen UI. It can be overwrite if specific device or
carrier don't want to show pukUnlockSreen UI.
Note the Emergency Dialer will not show up
if the device is not voice capable. Another reason to make
pukUnlockSreen UI enable as default.
bug:5243771
Change-Id: I141324bef6ab812243a6cbb89870f71c60e838ec
Provider was not being removed from the class map because it was using
the wrong key. D'oh.
Also a little cleanup.
Change-Id: I318e8b1a265318ac1474e0a7f14f27f89f357505
If restored scale and text wrap scale are set to 0 (meaning the previous
scale wasn't saved), set them to overview and reading level scale
respectively.
Bug: 5230909
Change-Id: If7724e9a0cd948c88d0a001728266a3282083bdc
Notify the register the current sim state right away in
registerSimStateCallback.Otherwise the register won't
receive any state until sim state gets changed again.
That will introduce a racing condition. If the sim state
changes to PUK_LOCKED after registering the callback, the
PUK unlock screen shows up. If the sim state changes to
PUK_LOCKED before registering, the PUK unlock screen won't
show.
bug:5243771
Change-Id: I27de1329a30adba68952cf086d2130c4cef54270