38204 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
Fabrice Di Meglio
b1e76ebaab am 2e8dd459: am 4e1b2f44: am 20b76b9f: am 1e761ded: Merge "Fix typos in LinearLayout comments" into jb-mr1-dev
* commit '2e8dd459fb111a8e38b01af4abbebe3b8acb497b':
  Fix typos in LinearLayout comments
2012-11-30 18:47:09 -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
32df98d52d am c566b43d: Fix crosstalk between users for widgets hosted in lockscreen
* commit 'c566b43d02596cba437e9a2723e9f989297cca72':
  Fix crosstalk between users for widgets hosted in lockscreen
2012-11-30 18:44:36 -08:00
Fabrice Di Meglio
77c67665c8 Merge "resolved conflicts for merge of 8794c80d to master" 2012-11-30 18:44:21 -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
Fabrice Di Meglio
2e8dd459fb am 4e1b2f44: am 20b76b9f: am 1e761ded: Merge "Fix typos in LinearLayout comments" into jb-mr1-dev
* commit '4e1b2f44e9f43b123e00eb210c9fa4ec78710782':
  Fix typos in LinearLayout comments
2012-11-30 17:20:44 -08:00
Fabrice Di Meglio
4e1b2f44e9 am 20b76b9f: am 1e761ded: Merge "Fix typos in LinearLayout comments" into jb-mr1-dev
* commit '20b76b9fff076241fe305fc99be3be7ab7d10407':
  Fix typos in LinearLayout comments
2012-11-30 17:18:49 -08:00
Fabrice Di Meglio
20b76b9fff am 1e761ded: Merge "Fix typos in LinearLayout comments" into jb-mr1-dev
* commit '1e761ded55695a9d76a6f00ee9504625581e8d3a':
  Fix typos in LinearLayout comments
2012-11-30 17:17:03 -08:00
Svetoslav Ganov
01a9adde7a Merge "Adding pool management via the poolable APIs to some classes." 2012-11-30 17:16:54 -08:00
Svetoslav Ganov
be922dc976 Adding pool management via the poolable APIs to some classes.
1. Removed the support for infinite pool size which nobody was using and
   does not make sense.

2. Update some classes in ViewGroup to use the poolable APIs.

Change-Id: Ifdb8c10968cd06fe53085ec9d3d649f7c9a944b7
2012-11-30 17:16:17 -08:00
Fabrice Di Meglio
1e761ded55 Merge "Fix typos in LinearLayout comments" into jb-mr1-dev 2012-11-30 17:14:11 -08:00
Fabrice Di Meglio
5412ba1cb9 resolved conflicts for merge of 8794c80d to master
Change-Id: I61313a3dd4cd0bcbf04c16dc17996a997b43fe0c
2012-11-30 17:08:26 -08:00
Romain Guy
53018e520d Merge "Apply dev. settings at runtime Bug #7434649" 2012-11-30 17:00:10 -08:00
Fabrice Di Meglio
8794c80dd7 am a9854ce9: am ce463847: Merge "Fix bug #7651552 resetRtlProperties() is called way too often" into jb-mr1.1-dev
* commit 'a9854ce9dfac086533e9d49ac75076bcc579303b':
  Fix bug #7651552 resetRtlProperties() is called way too often
2012-11-30 16:46:00 -08:00
Jonathan Dixon
f50ea4e1a3 Merge "Fix broken more JavaDoc links" 2012-11-30 16:44:39 -08:00
Fabrice Di Meglio
a9854ce9df am ce463847: Merge "Fix bug #7651552 resetRtlProperties() is called way too often" into jb-mr1.1-dev
* commit 'ce463847db68afbb796377c6a55209e102774f8c':
  Fix bug #7651552 resetRtlProperties() is called way too often
2012-11-30 16:41:12 -08:00
Fabrice Di Meglio
ce463847db Merge "Fix bug #7651552 resetRtlProperties() is called way too often" into jb-mr1.1-dev 2012-11-30 16:37:17 -08:00
Jonathan Dixon
47aaba3faf Fix broken more JavaDoc links
Change-Id: Ic1c74c739a668871e37b7b5868f1bc9ed3a65828
2012-11-30 16:32:17 -08:00
Romain Guy
5bb3c730f5 Apply dev. settings at runtime
Bug #7434649

Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
2012-11-30 16:29:33 -08:00
Jonathan Dixon
35cc3fb363 Merge "Fix broken JavaDoc" 2012-11-30 16:18:24 -08:00
Jonathan Dixon
7c28219cc9 Fix broken JavaDoc
Change-Id: I1e6d595f0fcd1a816ed39aaa801f7d451eb39f85
2012-11-30 15:53:28 -08:00
Nicolas Klein
a3b7e450bc am ca4199ef: am 04f3b12f: am 5ea914f2: am 759c1005: Merge "Fix some typos and missing @param in android.os.Bundle" into jb-mr1-dev
* commit 'ca4199ef8b70f73f914b72ec69fc596c2ca600e2':
  Fix some typos and missing @param in android.os.Bundle
2012-11-30 15:52:25 -08:00
Nicolas Klein
ca4199ef8b am 04f3b12f: am 5ea914f2: am 759c1005: Merge "Fix some typos and missing @param in android.os.Bundle" into jb-mr1-dev
* commit '04f3b12f1f82784d0b1b8c0812a3d0017b17b69e':
  Fix some typos and missing @param in android.os.Bundle
2012-11-30 15:44:17 -08:00
Nicolas Klein
04f3b12f1f am 5ea914f2: am 759c1005: Merge "Fix some typos and missing @param in android.os.Bundle" into jb-mr1-dev
* commit '5ea914f21b397ae57195decd0b5e37544d85db8c':
  Fix some typos and missing @param in android.os.Bundle
2012-11-30 15:41:10 -08:00
Fabrice Di Meglio
cb5f9db47a Fix bug #7651552 resetRtlProperties() is called way too often
- remove unnecessary calls to resetRtlProperties().
- now reset of RTL properties will only be done when adding a View
(and no more when removing it)

Change-Id: I0d42128c9f7df6085fb92bb5af5c9bd4d1ba88a3
2012-11-30 15:32:56 -08:00
Nicolas Klein
5ea914f21b am 759c1005: Merge "Fix some typos and missing @param in android.os.Bundle" into jb-mr1-dev
* commit '759c1005b3f96ea8bbf59192d206aacece315655':
  Fix some typos and missing @param in android.os.Bundle
2012-11-30 14:54:50 -08:00
Nicolas Klein
9f6cb87522 Fix some typos and missing @param in android.os.Bundle
getChar(String) and getChar(String, char) had wrong description in their
javadoc.
Also most of the get methods with default value were missing the corresponding
@param tag for the default value parameter.

Change-Id: I0f38b3caacf9cabd70e0c1ada36af3662f5566d0
2012-11-30 14:41:46 -08:00
Daniel Sandler
f004698fd0 am 57b47ae9: am 9e129f37: am 924fc3e6: Merge "Add constant for Daydream settings." into jb-mr1.1-dev
* commit '57b47ae95d87c783b39a8d188c059166c04df72b':
  Add constant for Daydream settings.
2012-11-30 13:26:18 -08:00
Svetoslav Ganov
488c2d274b am d902dbb2: am ed734d98: am 0e7adaff: am 438a3b35: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
* commit 'd902dbb2ea7fa3cf50e89d84d1758bac4738e0e1':
  Cannot move edit text cursor to first position using character granularity.
2012-11-30 13:26:06 -08:00
Daniel Sandler
57b47ae95d am 9e129f37: am 924fc3e6: Merge "Add constant for Daydream settings." into jb-mr1.1-dev
* commit '9e129f37b6dd6f8c3d1a3869ae60285a414c8558':
  Add constant for Daydream settings.
2012-11-30 13:22:03 -08:00
Svetoslav Ganov
d902dbb2ea am ed734d98: am 0e7adaff: am 438a3b35: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
* commit 'ed734d98d014945cf28aa5e49ba1fd2ff5c82c01':
  Cannot move edit text cursor to first position using character granularity.
2012-11-30 13:21:53 -08:00
Daniel Sandler
9e129f37b6 am 924fc3e6: Merge "Add constant for Daydream settings." into jb-mr1.1-dev
* commit '924fc3e6ce68f7943f3fd2ced3281c3fd05f2e7f':
  Add constant for Daydream settings.
2012-11-30 13:17:22 -08:00
Svetoslav Ganov
ed734d98d0 am 0e7adaff: am 438a3b35: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
* commit '0e7adaff99778c596bfd3f4c1e42710592c472a2':
  Cannot move edit text cursor to first position using character granularity.
2012-11-30 13:17:08 -08:00
Daniel Sandler
924fc3e6ce Merge "Add constant for Daydream settings." into jb-mr1.1-dev 2012-11-30 13:03:08 -08:00
Svetoslav Ganov
0e7adaff99 am 438a3b35: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
* commit '438a3b35f7a6184a19919de90f733be82e21a84c':
  Cannot move edit text cursor to first position using character granularity.
2012-11-30 12:40:37 -08:00
Svetoslav Ganov
438a3b35f7 Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev 2012-11-30 11:43:54 -08:00
Nick Kralevich
701e73d3f6 am 4816f4b4: am 0def7b94: am 849f5188: am 6643ea82: resolved conflicts for merge of 011132a7 to jb-mr1-dev
* commit '4816f4b4088ce35b2cddf1034ae483e30b7ed22c':
  Secure a handful of framework broadcasts
2012-11-30 10:43:24 -08:00
Nick Kralevich
4816f4b408 am 0def7b94: am 849f5188: am 6643ea82: resolved conflicts for merge of 011132a7 to jb-mr1-dev
* commit '0def7b94960ae551c498212d97c7919da7529429':
  Secure a handful of framework broadcasts
2012-11-30 10:40:18 -08:00
Nick Kralevich
0def7b9496 am 849f5188: am 6643ea82: resolved conflicts for merge of 011132a7 to jb-mr1-dev
* commit '849f5188e34ea667b689e795d88411a2412db2e8':
  Secure a handful of framework broadcasts
2012-11-30 10:38:21 -08:00
Nick Kralevich
849f5188e3 am 6643ea82: resolved conflicts for merge of 011132a7 to jb-mr1-dev
* commit '6643ea823bf8b0726da0518ffecfcc7a9f60f87d':
  Secure a handful of framework broadcasts
2012-11-30 10:35:44 -08:00
Nick Kralevich
6643ea823b resolved conflicts for merge of 011132a7 to jb-mr1-dev
Change-Id: I304ef91eef99526dec348a59b12c0934173bcfcb
2012-11-30 10:23:56 -08:00
Marco Nelissen
0c779aa1fb am 7f05beb1: am 334a36b3: Merge "Change the text color of timer in MediaController"
* commit '7f05beb125a0270fee58a96b533baf97536d8b7e':
  Change the text color of timer in MediaController
2012-11-30 10:12:47 -08:00
Robert Greenwalt
011132a7d3 am b8da0376: Secure a handful of framework broadcasts
* commit 'b8da0376f2d50fdb2ee58deacc6d2041689e36d1':
  Secure a handful of framework broadcasts
2012-11-30 10:05:33 -08:00
Marco Nelissen
7f05beb125 am 334a36b3: Merge "Change the text color of timer in MediaController"
* commit '334a36b32c96d26f3aedcca81ab475391414dc80':
  Change the text color of timer in MediaController
2012-11-30 09:55:34 -08:00
Irfan Sheriff
38ddedc8ad Merge "Support for dumping transition only messages" 2012-11-30 09:41:51 -08:00
Eric Laurent
b686eceac9 am b46857d2: am b1f45c4a: am c3eb57b2: Merge "AudioService: improve initial safe volume delay" into jb-mr1.1-dev
* commit 'b46857d228edc53878e738ffd484dea1acf44baf':
  AudioService: improve initial safe volume delay
2012-11-30 09:33:01 -08:00
Eric Laurent
b46857d228 am b1f45c4a: am c3eb57b2: Merge "AudioService: improve initial safe volume delay" into jb-mr1.1-dev
* commit 'b1f45c4a587e5adda39774a867c78b56682c5f0d':
  AudioService: improve initial safe volume delay
2012-11-30 09:31:03 -08:00
Eric Laurent
b1f45c4a58 am c3eb57b2: Merge "AudioService: improve initial safe volume delay" into jb-mr1.1-dev
* commit 'c3eb57b22f930f07448e877f0814eb5659bfc3c5':
  AudioService: improve initial safe volume delay
2012-11-30 09:28:56 -08:00