2426 Commits

Author SHA1 Message Date
Svetoslav Ganov
152e9bb81a Refactoring of the screen magnification feature.
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
2012-12-03 10:38:48 -08:00
Amith Yamasani
c72beac860 am 0f469f4f: am 32df98d5: am c566b43d: Fix crosstalk between users for widgets hosted in lockscreen
* commit '0f469f4f7eff8faee4350a0d82af325d4ae10b43':
  Fix crosstalk between users for widgets hosted in lockscreen
2012-11-30 19:10:36 -08:00
Amith Yamasani
0f469f4f7e am 32df98d5: am c566b43d: Fix crosstalk between users for widgets hosted in lockscreen
* commit '32df98d52d482498d998b424684610c15098897a':
  Fix crosstalk between users for widgets hosted in lockscreen
2012-11-30 18:46:45 -08:00
Amith Yamasani
c566b43d02 Fix crosstalk between users for widgets hosted in lockscreen
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
2012-11-30 17:28:08 -08:00
Jim Miller
f8b26c67ad am cd4d3495: am f6fe2444: am e431e6a3: Merge "Add logging to try and track down bug 7643792" into jb-mr1.1-dev
* commit 'cd4d34954c39a005c66e8ee438032d7e51b9f473':
  Add logging to try and track down bug 7643792
2012-11-30 16:04:42 -08:00
Jim Miller
cd4d34954c am f6fe2444: am e431e6a3: Merge "Add logging to try and track down bug 7643792" into jb-mr1.1-dev
* commit 'f6fe244422166d0120dbbc8c8cf360a99f215d8b':
  Add logging to try and track down bug 7643792
2012-11-30 16:02:12 -08:00
Jim Miller
e431e6a352 Merge "Add logging to try and track down bug 7643792" into jb-mr1.1-dev 2012-11-30 15:57:46 -08:00
Jim Miller
2b84b817e4 Add logging to try and track down bug 7643792
Fix whitespace & log message.

Change-Id: I9d241365503a6a9b02d3155dbb06ddb82065b375
2012-11-30 15:54:38 -08:00
John Spurlock
cc95712ea2 am 368016f7: am bd0e1808: am 4015c3f8: Merge "Only show camera widget to setup users." into jb-mr1.1-dev
* commit '368016f769903df05ad5af51e8402dc372d5cd49':
  Only show camera widget to setup users.
2012-11-30 13:29:14 -08:00
John Spurlock
368016f769 am bd0e1808: am 4015c3f8: Merge "Only show camera widget to setup users." into jb-mr1.1-dev
* commit 'bd0e180893c33f6958d4940709687ef2a52e8336':
  Only show camera widget to setup users.
2012-11-30 13:26:47 -08:00
John Spurlock
4015c3f815 Merge "Only show camera widget to setup users." into jb-mr1.1-dev 2012-11-30 13:20:09 -08:00
Daniel Sandler
9e3efb9155 am d1b73fc1: am 71988c81: am 386165a3: Merge "Only show "charging" if the battery is really charging." into jb-mr1.1-dev
* commit 'd1b73fc17ca222cc627c932625efe9c3c1ad3b0c':
  Only show "charging" if the battery is really charging.
2012-11-30 07:34:53 -08:00
Daniel Sandler
d1b73fc17c am 71988c81: am 386165a3: Merge "Only show "charging" if the battery is really charging." into jb-mr1.1-dev
* commit '71988c81a3ae9d372c1eb2991f509a8c5c83f08c':
  Only show "charging" if the battery is really charging.
2012-11-30 07:32:24 -08:00
Daniel Sandler
386165a3ae Merge "Only show "charging" if the battery is really charging." into jb-mr1.1-dev 2012-11-30 07:27:36 -08:00
John Spurlock
371f3408d6 Only show camera widget to setup users.
And remove misspelled and unused field in KeyguardHostView.

Bug:7645811
Change-Id: I3d6ceae8d25d0af7b504b4c22782611d25462a62
2012-11-30 09:20:43 -05:00
Winson Chung
ede31a6897 am e6dc0139: am c93d558a: am 818b2f34: Merge "Fixing issue where you can still click on a widget on a side page. (Bug 7568412)" into jb-mr1.1-dev
* commit 'e6dc013913111a0f94e8fd8201311a022295cd3d':
  Fixing issue where you can still click on a widget on a side page. (Bug 7568412)
2012-11-29 16:06:44 -08:00
Winson Chung
e6dc013913 am c93d558a: am 818b2f34: Merge "Fixing issue where you can still click on a widget on a side page. (Bug 7568412)" into jb-mr1.1-dev
* commit 'c93d558a53424f625129a9da2ece376a52896854':
  Fixing issue where you can still click on a widget on a side page. (Bug 7568412)
2012-11-29 16:04:49 -08:00
Winson Chung
818b2f341c Merge "Fixing issue where you can still click on a widget on a side page. (Bug 7568412)" into jb-mr1.1-dev 2012-11-29 15:59:45 -08:00
Michael Jurka
223172045f am 4ed32c24: am d2de8033: am a8d63ec9: Merge "Disable adding keyguard widgets until setup is done" into jb-mr1.1-dev
* commit '4ed32c248a70fb3ab4d36def8f73e5b88b7fc3d5':
  Disable adding keyguard widgets until setup is done
2012-11-29 15:58:14 -08:00
Michael Jurka
4ed32c248a am d2de8033: am a8d63ec9: Merge "Disable adding keyguard widgets until setup is done" into jb-mr1.1-dev
* commit 'd2de8033a304e951426e66e1f2c800402271c5e3':
  Disable adding keyguard widgets until setup is done
2012-11-29 15:56:34 -08:00
John Spurlock
0313864236 am 721aaead: am 1428384c: am 958343c1: Merge "Fix for navbar back/home appearing in keyguard (multiuser)." into jb-mr1.1-dev
* commit '721aaead07c162ad745e5ed4d7e549f89c8b9a60':
  Fix for navbar back/home appearing in keyguard (multiuser).
2012-11-29 14:33:37 -08:00
Dianne Hackborn
36893b16ce am 221d59f7: am afdd978c: am 68e0da7e: Merge "Quiet down a lot of logging." into jb-mr1.1-dev
* commit '221d59f723584d316ea225bdaf1bc75cbfd7a794':
  Quiet down a lot of logging.
2012-11-29 14:32:25 -08:00
John Spurlock
721aaead07 am 1428384c: am 958343c1: Merge "Fix for navbar back/home appearing in keyguard (multiuser)." into jb-mr1.1-dev
* commit '1428384c6217c843169e233dc934d5fcbf18a792':
  Fix for navbar back/home appearing in keyguard (multiuser).
2012-11-29 14:28:15 -08:00
Dianne Hackborn
221d59f723 am afdd978c: am 68e0da7e: Merge "Quiet down a lot of logging." into jb-mr1.1-dev
* commit 'afdd978ccd8d45ac789873dd4cf0ab0dd3f46d20':
  Quiet down a lot of logging.
2012-11-29 14:25:40 -08:00
Michael Jurka
fff5614cae Disable adding keyguard widgets until setup is done
Bug: 7504154

Change-Id: I865f0139bb328e6b9b19493e0d8f9f086e2ebc38
2012-11-29 13:15:39 -08:00
Winson Chung
06598bede5 Saving and restoring current page when rotating in lockscreen. (Bug 7568412)
Change-Id: Ia80845d05df04dc2d31a834279096e5ed165a646
2012-11-29 12:54:45 -08:00
Brian Colonna
d219cebfcb am eceef837: am ceb87a66: am 6f6facc1: Merge "Ignoring FUL unlock signal if user changed fixes b/7572354" into jb-mr1.1-dev
* commit 'eceef837e34e6860ad532d15402435606550f3fa':
  Ignoring FUL unlock signal if user changed fixes b/7572354
2012-11-29 12:48:41 -08:00
Brian Colonna
eceef837e3 am ceb87a66: am 6f6facc1: Merge "Ignoring FUL unlock signal if user changed fixes b/7572354" into jb-mr1.1-dev
* commit 'ceb87a664fdcfa08f98238bfe41fc3a03603cbf8':
  Ignoring FUL unlock signal if user changed fixes b/7572354
2012-11-29 12:45:18 -08:00
Daniel Sandler
fe0e1e445f Only show "charging" if the battery is really charging.
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
2012-11-29 15:11:50 -05:00
John Spurlock
ce479d831a Fix for navbar back/home appearing in keyguard (multiuser).
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
2012-11-29 09:52:21 -05:00
Dianne Hackborn
68e0da7e39 Merge "Quiet down a lot of logging." into jb-mr1.1-dev 2012-11-28 15:03:39 -08:00
Brian Colonna
6f6facc178 Merge "Ignoring FUL unlock signal if user changed fixes b/7572354" into jb-mr1.1-dev 2012-11-28 12:46:24 -08:00
Dianne Hackborn
40e9f2922c Quiet down a lot of logging.
Also fix a little problem where the USER_STARTED broadcasts
were not being sent as ordered broadcasts(!).

Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
2012-11-27 19:12:23 -08:00
Winson Chung
fb8ca912e8 am d0079891: am 9f6e8ddf: am 2b847c39: Merge "Removing unecessary additional lock metadata from QuickSettings user tile." into jb-mr1.1-dev
* commit 'd0079891e3a8034f560eaf88d5be692b61ca4b9a':
  Removing unecessary additional lock metadata from QuickSettings user tile.
2012-11-27 17:33:46 -08:00
Winson Chung
d0079891e3 am 9f6e8ddf: am 2b847c39: Merge "Removing unecessary additional lock metadata from QuickSettings user tile." into jb-mr1.1-dev
* commit '9f6e8ddf5d48a695b26f1d9759696b56952177bd':
  Removing unecessary additional lock metadata from QuickSettings user tile.
2012-11-27 11:36:13 -08:00
Winson Chung
1272e0e37b Fixing issue where you can still click on a widget on a side page. (Bug 7568412)
Change-Id: I7105bc6b06e850e6029d12b0fe36fad00b538e1a
2012-11-26 17:06:34 -08:00
Winson Chung
f7614fc744 Removing unecessary additional lock metadata from QuickSettings user tile.
Change-Id: I89ec94385eb3cdd46ad6942bf8989fb04d5c0370
2012-11-26 14:44:03 -08:00
Winson Chung
26c8a8c912 am e41ea2c0: am 037e8ee2: am 9a0fbd4c: Merge "Removing the plus page when we reach the max number of allowable widgets. (Bug 7564782)" into jb-mr1.1-dev
* commit 'e41ea2c0888964a5feb5836260f7f93cd36e0a8f':
  Removing the plus page when we reach the max number of allowable widgets. (Bug 7564782)
2012-11-26 11:53:00 -08:00
Winson Chung
e41ea2c088 am 037e8ee2: am 9a0fbd4c: Merge "Removing the plus page when we reach the max number of allowable widgets. (Bug 7564782)" into jb-mr1.1-dev
* commit '037e8ee26f9fa6e2f30d9501a4db43161904c905':
  Removing the plus page when we reach the max number of allowable widgets. (Bug 7564782)
2012-11-26 11:50:59 -08:00
Winson Chung
4752e7d1a9 Removing the plus page when we reach the max number of allowable widgets. (Bug 7564782)
- Also adding feedback on the plus page (Bug 7500328)

Change-Id: Iddd09b7a3d5347a43bc040052114879cbaecccd9
2012-11-26 11:36:40 -08:00
Adam Cohen
4c599357ad am 1d2f60e5: am bb1d720d: am 2b0501bf: Fix a couple issues with page / outline alphas (issue 7488857)
* commit '1d2f60e5227fa4e5f04b65c5487f99c17225001b':
  Fix a couple issues with page / outline alphas (issue 7488857)
2012-11-21 17:25:54 -08:00
Adam Cohen
1d2f60e522 am bb1d720d: am 2b0501bf: Fix a couple issues with page / outline alphas (issue 7488857)
* commit 'bb1d720df0e33cd4becdf6cc185881c525e8600a':
  Fix a couple issues with page / outline alphas (issue 7488857)
2012-11-21 17:24:16 -08:00
Adam Cohen
2b0501bf58 Fix a couple issues with page / outline alphas (issue 7488857)
-> 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
2012-11-21 17:18:57 -08:00
Michael Jurka
29b138e1d2 am 0d08a49a: am 6d6f1e8d: am 545043e5: Fix reboot loop caused by keyguard appwidget cleanup
* commit '0d08a49af9bf1724bc2470f8defecc8baf7d9475':
  Fix reboot loop caused by keyguard appwidget cleanup
2012-11-21 14:33:07 -08:00
Michael Jurka
0d08a49af9 am 6d6f1e8d: am 545043e5: Fix reboot loop caused by keyguard appwidget cleanup
* commit '6d6f1e8d89e320edb2c765f8e8cfd4bcd0ec89a6':
  Fix reboot loop caused by keyguard appwidget cleanup
2012-11-21 14:29:15 -08:00
Michael Jurka
545043e59e Fix reboot loop caused by keyguard appwidget cleanup
Bug: 7591092
2012-11-21 14:02:34 -08:00
John Spurlock
d9ff26ba6e am fe15574e: am 92cabadf: am dc3d76f2: Merge "Refactor the lockscreen camera widget, removing the bitmap." into jb-mr1.1-dev
* commit 'fe15574e195cea534201f1edb59bbf5c28fdd2e8':
  Refactor the lockscreen camera widget, removing the bitmap.
2012-11-20 16:07:14 -08:00
John Spurlock
fe15574e19 am 92cabadf: am dc3d76f2: Merge "Refactor the lockscreen camera widget, removing the bitmap." into jb-mr1.1-dev
* commit '92cabadf900e5489c33599becebc8265569d57ff':
  Refactor the lockscreen camera widget, removing the bitmap.
2012-11-20 16:05:10 -08:00
Brian Colonna
5eb83aa896 Ignoring FUL unlock signal if user changed fixes b/7572354
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
2012-11-19 17:45:44 -05:00
John Spurlock
0552c5d75a Refactor the lockscreen camera widget, removing the bitmap.
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
2012-11-19 16:32:30 -05:00