1. The screen magnification feature was implemented entirely as a part of the accessibility
manager. To achieve that the window manager had to implement a bunch of hooks for an
external client to observe its internal state. This was problematic since it dilutes
the window manager interface and allows code that is deeply coupled with the window
manager to reside outside of it. Also the observer callbacks were IPCs which cannot
be called with the window manager's lock held. To avoid that the window manager had
to post messages requesting notification of interested parties which makes the code
consuming the callbacks to run asynchronously of the window manager. This causes timing
issues and adds unnecessary complexity.
Now the magnification logic is split in two halves. The first half that is responsible
to track the magnified portion of the screen and serve as a policy which windows can be
magnified and it is a part of the window manager. This part exposes higher level APIs
allowing interested parties with the right permissions to control the magnification
of a given display. The APIs also allow a client to be registered for callbacks on
interesting changes such as resize of the magnified region, etc. This part servers
as a mediator between magnification controllers and the window manager.
The second half is a controller that is responsible to drive the magnification
state based on touch interactions. It also presents a highlight when magnified to
suggest the magnified potion of the screen. The controller is responsible for auto
zooming out in case the user context changes - rotation, new actitivity. The controller
also auto pans if a dialog appears and it does not interesect the magnified frame.
bug:7410464
2. By design screen magnification and touch exploration work separately and together. If
magnification is enabled the user sees a larger version of the widgets and a sub section
of the screen content. Accessibility services use the introspection APIs to "see" what
is on the screen so they can speak it, navigate to the next item in response to a
gesture, etc. Hence, the information returned to accessibility services has to reflect
what a sighted user would see on the screen. Therefore, if the screen is magnified
we need to adjust the bounds and position of the infos describing views in a magnified
window such that the info bounds are equivalent to what the user sees.
To improve performance we keep accessibility node info caches in the client process.
However, when magnification state changes we have to clear these caches since the
bounds of the cached infos no longer reflect the screen content which just got smaller
or larger.
This patch propagates not only the window scale as before but also the X/Y pan and the
bounds of the magnified portion of the screen to the introspected app. This information
is used to adjust the bounds of the node infos coming from this window such that the
reported bounds are the same as the user sees not as the app thinks they are. Note that
if magnification is enabled we zoom the content and pan it along the X and Y axis. Also
recomputed is the isVisibleToUser property of the reported info since in a magnified
state the user sees a subset of the window content and the views not in the magnified
viewport should be reported as not visible to the user.
bug:7344059
Change-Id: I6f7832c7a6a65c5368b390eb1f1518d0c7afd7d2
This was initially about the Clock widget crashing repeatedly on some
devices with multiple users. Turned out that there were race conditions
when switching users that could result in remote views of one user calling
back to the RemoteViewsAdapter in keyguard that in turn sent an incorrect widget id
to a different user's widget, resulting in a crash.
Since KeyguardHostView is instantiated in the same process for different users,
it needs to carry a user identity to pass along to AppWidgetService so that
remote views services were bound to the correct user and callbacks were attached and
detached properly.
Added some aidl calls that take the userId to do the binding properly. A more
complete fix might be needed in the future so that all calls from Keyguard carry
the user id.
Also, there was a problem in comparing host uid for secondary users, since Settings
for a secondary user has a different uid than keyguard. Not an issue on single-user
systems. Changed the host.uid comparison to accomodate for the secondary user.
Bug: 7450247
Change-Id: Idbc36e3c60023cac74174f6cb7f2b2130dd3052c
If there's a charge problem (battery health/temperature out
of spec, or low charging current), the lockscreen and status
bar should not indicate that charging is occurring.
(Previously we showed "Charging" and a lightning bolt any
time the device was plugged in.)
Bug: 7509976
Change-Id: I27ec0e2cec1307fbc6ef262dd5181a4db6d3bed0
Clear remembered sysui visibility flags in PhoneWindowManager
when switching users. They might have been from another user.
Then reapply current window's flags to ensure contribution
makes it to the status bar.
Bug:7506446
Change-Id: I8249ba006934bdc22b952da7c16e9983d091c489
Also fix a little problem where the USER_STARTED broadcasts
were not being sent as ordered broadcasts(!).
Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
-> Fix bug where page hints didn't disappear on boot
-> Fix bug where you see a weird rotated page under the
lock affordance (usually after adding a widget)
Change-Id: I75b04ceadbc296d033cc9fb1cff32ab9d6e5ce9b
Prior to this fix, one user could log into another user's account by
waiting for FUL to recognize them on their account, and then
switching to another account at a very precise time - after FUL has
recognized the user but before the device has unlocked.
This was caused by the FUL unlock() callback telling the device to
unlock even though the user had changed. The fix is to only unlock
the device if the current user ID matches the user ID used to run
FUL.
Change-Id: I516b52d99ab7609b836939e4aae6e7df77a9e047
The new approach is to create two views:
- Widget preview, drawn at full-size, then scaled to fit frame.
- Fullscreen preview, drawn at full-size, used during animation.
Two views are necessary to both ensure the widget scrolls properly
with the widget page yet still appears to scale up and match
the camera app pixel for pixel.
The offscreen bitmap and associated background rendering is no
longer necessary. This avoids the large allocation and associated
rendering time after turning screen on.
Also fixes 1px horizontal discrepancy during old scale-up anim.
Also suppresses long-click behavior on the camera widget.
Bug:7471107
Bug:7559755
Change-Id: I1d834aa743bc05d6a7e2ce3eadfee8d5ff40da37