38405 Commits

Author SHA1 Message Date
Amith Yamasani
94022e8997 Make 3rd party lockscreen widgets work on secondary users
If you install a lockscreen widget app on a secondary user, lockscreen fails to find it.
There were several places where the correct context and userId were required under the
covers - AppWidgetHost, AppWidgetHostView and RemoteViewsAdapter.

Set the user id in the required places and use it to query the package information.

Bug: 7662835
Change-Id: Ife482c8ab2a2e601650b7cfe2660e88d3b8f2050
2012-12-04 16:25:38 -08:00
Chris Craik
9efa222b34 Defer process mode upon draw
Process mode functor execution can be expensive, and cause dropped frames if it
runs between two expensive frames (when there isn't cpu time to spare). Avoid
this by delaying the process mode by an additional 4 ms every time we hit a draw

bug:7670326
Change-Id: I27f42458d4a815183a4b24c7748e05bc361fb943
2012-12-04 15:45:41 -08:00
Jeff Brown
7f3994ec2a Pin electron beam surface to natural orientation.
If a rotation occurred while the electron beam surface was showing,
the surface may have appeared in the wrong orientation.  We fix this
problem by adjusting the transformation matrix of the electron beam
surface according to the display orientation whenever a display
transaction occurs.

The rotation itself is allowed to proceed but it is not visible
to the user.  We must let this happen so that the lock screen
is correctly oriented when the screen is turned back on.

Note that the electron beam surface serves two purposes.

First, it is used to play the screen off animation.
When the animation is finished, the surface remains visible but is
solid black.  Then we turn the screen off.

Second, when we turn the screen back on we leave the electron beam
surface showing until the window manager is ready to show the
new content.  This prevents the user from seeing a flash of the
old content while the screen is being turned on.  When everything is
ready, we dismiss the electron beam.

It's important for the electron beam to remain visible for
the entire duration from just before the screen is turned off until
after the screen is turned on and is ready to be seen.  This is
why we cannot fix the bug by deferring rotation or otherwise
getting in the way of the window manager doing what it needs
to do to get the screen ready when the screen is turned on again.

Bug: 7479740
Change-Id: I2fcf35114ad9b2e00fdfc67793be6df62c8dc4c3
2012-12-04 14:40:23 -08:00
Daniel Sandler
3ff1139032 am 994901ee: am d9e46ac5: am d8cb8fa4: Merge "Revised language for notification ringtone picker." into jb-mr1.1-dev
* commit '994901ee7f096751cc593e213ea60a1cbdd9504a':
  Revised language for notification ringtone picker.
2012-12-04 11:09:25 -08:00
Daniel Sandler
994901ee7f am d9e46ac5: am d8cb8fa4: Merge "Revised language for notification ringtone picker." into jb-mr1.1-dev
* commit 'd9e46ac5ffcd2a1b3abf70bde14af7d10ebf018b':
  Revised language for notification ringtone picker.
2012-12-04 11:06:25 -08:00
Romain Guy
ee0ff18c36 Merge "Optimize onAttachedTo/onDetachedFromWindow" 2012-12-04 11:05:21 -08:00
Daniel Sandler
d9e46ac5ff am d8cb8fa4: Merge "Revised language for notification ringtone picker." into jb-mr1.1-dev
* commit 'd8cb8fa463c9a527aff462f887dbca9fa9843fcf':
  Revised language for notification ringtone picker.
2012-12-04 11:03:44 -08:00
Daniel Sandler
d8cb8fa463 Merge "Revised language for notification ringtone picker." into jb-mr1.1-dev 2012-12-04 11:01:04 -08:00
Irfan Sheriff
56a715ef7a Merge "Fix NPE in StateMachine" 2012-12-04 10:23:09 -08:00
Irfan Sheriff
f98facaf80 Fix NPE in StateMachine
Bug: 7661311
Change-Id: I8645692baf43aced1f4b364bbf13275646754b63
2012-12-04 10:17:25 -08:00
Daniel Sandler
aa9c5b6e9f Revised language for notification ringtone picker.
Bug: 7659273
Change-Id: I5cb94a24b8ebff96ab5b567efc39a780300ee7ee
2012-12-04 09:06:21 -05:00
Baligh Uddin
cabdbfcbda Merge "Import translations. DO NOT MERGE" 2012-12-03 21:15:55 -08:00
Baligh Uddin
d8567b661c am 47ae0b93: Merge "Import translations. DO NOT MERGE" into jb-mr1-dev
* commit '47ae0b93c3a3b4fcb32cd46ad3b8313959344912':
  Import translations. DO NOT MERGE
2012-12-03 21:09:55 -08:00
Baligh Uddin
2306bec585 am 4ca5fbaa: Merge "Import translations. DO NOT MERGE" into jb-mr1-aah-dev
* commit '4ca5fbaa91dc002647b2fd5f63b8a162cefc3553':
  Import translations. DO NOT MERGE
2012-12-03 21:04:02 -08:00
Baligh Uddin
4ca5fbaa91 Merge "Import translations. DO NOT MERGE" into jb-mr1-aah-dev 2012-12-03 21:00:51 -08:00
Romain Guy
fbb93fa2f3 Optimize onAttachedTo/onDetachedFromWindow
Apps detaching/attaching large subtrees would waste a few milliseconds
dealing with dirty display lists. This change removes the need to do
ArrayList.remove() on every detachedFromWindow().

Change-Id: Icee72516c40d48ff0fd9d6f3128589f99bf61428
2012-12-03 18:51:57 -08:00
Svetoslav Ganov
0b0afb49a8 Adding API for refreshing the state of an AccessibilityNodeInfo.
Sometimes a client needs to hold onto an accessibility node info and
this info may get into a stale state. The clent has to be able to
request a refresh of the info. This change adds a refresh call to
AccessibilityNodeInfo.

bug:6711796

Change-Id: I580a9a5d9fd1f705ea0a2cf4d3ff65543714c9c3
2012-12-03 16:59:22 -08:00
Dianne Hackborn
f9ae5f75af am 23307cbb: am e0a676a3: Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev
* commit '23307cbb6b432b658b0fd7437dacfedd6298af94':
  Fix issue #7649590: Background windows sometimes not being hidden for secondary users
2012-12-03 16:08:35 -08:00
Svetoslav Ganov
2c5f782094 Merge "Refactoring of the screen magnification feature." 2012-12-03 15:59:32 -08:00
Dianne Hackborn
23307cbb6b am e0a676a3: Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev
* commit 'e0a676a3bb0e7b9aced9359a021e4c5d2ffef752':
  Fix issue #7649590: Background windows sometimes not being hidden for secondary users
2012-12-03 15:54:34 -08:00
Dianne Hackborn
e0a676a3bb Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev 2012-12-03 15:51:47 -08:00
Glenn Kasten
1adb715bc6 new can't fail on Android
Change-Id: I0e048d3d8ba1ec34d13684b9fd898035d3381db8
2012-12-03 15:28:36 -08:00
Amith Yamasani
29ac89f0cc am 2d332c1e: am 3533ea3b: am 844884d8: Merge "Fix remote views cache to avoid lockscreen widget crosstalk" into jb-mr1.1-dev
* commit '2d332c1e891431207d4e0b2d08a00db5297a5f89':
  Fix remote views cache to avoid lockscreen widget crosstalk
2012-12-03 15:17:02 -08:00
Amith Yamasani
2d332c1e89 am 3533ea3b: am 844884d8: Merge "Fix remote views cache to avoid lockscreen widget crosstalk" into jb-mr1.1-dev
* commit '3533ea3bbb0c71f1b7e7ebcb442ac4f3230bceeb':
  Fix remote views cache to avoid lockscreen widget crosstalk
2012-12-03 15:15:21 -08:00
Amith Yamasani
3533ea3bbb am 844884d8: Merge "Fix remote views cache to avoid lockscreen widget crosstalk" into jb-mr1.1-dev
* commit '844884d82e1b2339cdbf43f64445c5d550c4691c':
  Fix remote views cache to avoid lockscreen widget crosstalk
2012-12-03 15:12:38 -08:00
Amith Yamasani
844884d82e Merge "Fix remote views cache to avoid lockscreen widget crosstalk" into jb-mr1.1-dev 2012-12-03 15:09:36 -08:00
Dianne Hackborn
bb4ca5271a Fix issue #7649590: Background windows sometimes not being hidden for secondary users
There are two things going on here:

(1) In secondary users, some times theme information such as whether
the window is full screen opaque was not being retrieved, so the window
manager didn't know that it could hide the windows behind the app.
This would just be a performance problem, except that:

(2) There appear to be a number of applications that declare that they
are full screen opaque, when in fact they are not.  Instead they are
using window surfaces with an alpha channel, and setting some pixels
in their window to a non-opaque alpha level.  This will allow you to
see whatever is behind the app.  If the system happens to completely
remove the windows behind the app, and somebody is filling the frame
buffer with black, then you will see what the app intends -- those
parts of its UI blended with black.  If one of those cases doesn't
hold (and though we have never guaranteed they would, in practice this
is generally what happens), then you will see something else.

At any rate, if nothing else than for performance reasons, we need to
fix issue #1.

It turns out what is happening here is that the AttributeCache used
by the activity manager and window manager to retreive theme and other
information about applications has not yet been updated for multi-user.

One of the things we retrieve from this is the theme information telling
the window manager whether an application's window should be treated
as full screen opaque, allowing it to hide any windows behind it.  In
the current implementation, the AttributeCache always retrieves this
information about the application as the primary user (user 0).

So, if you have an application that is installed on a secondary user but
not installed on the primary user, when the AttributeCache tries to retrieve
the requested information for it, then from the perspective of the primary user
it considers the application not installed, and is not able to retrieve that
info.

The change here makes AttributeCache multi-user aware, keeping all of its
data separately per-user, and requiring that callers now provide the user
they want to retrieve information for.  Activity manager and window manager
are updated to be able to pass in the user when needed.  This required some
fiddling of the window manager to have that information available -- in
particular it needs to be associated with the AppWindowToken.

Change-Id: I4b50b4b3a41bab9d4689e61f3584778e451343c8
2012-12-03 14:09:06 -08:00
Amith Yamasani
ac2e6dd590 Fix remote views cache to avoid lockscreen widget crosstalk
Bug: 7660973

RemoteViewsAdapter will now store the userId as part of the cache key
when caching remote views to optimize for orientation changes.

Change-Id: I7c4e52b3995d4f56ebfa35aa9516327e182ad892
2012-12-03 13:41:16 -08:00
Chet Haase
19c84ea621 Merge "Fix requestLayout-during-layout problems" 2012-12-03 12:34:10 -08:00
Romain Guy
9badf238ee Merge "Close InputStream after we're done reading from it External bug #40837" 2012-12-03 11:36:49 -08:00
Adam Powell
897ccbbdd8 am e4db4e2b: am 05c8f17f: Merge "resolver list is not cleared on rebuild"
* commit 'e4db4e2b9dca065fbbf9f10dd5b9e961a9acef46':
  resolver list is not cleared on rebuild
2012-12-03 11:35:02 -08:00
Adam Powell
e4db4e2b9d am 05c8f17f: Merge "resolver list is not cleared on rebuild"
* commit '05c8f17f05ca83573f7670191e6dec91497dc742':
  resolver list is not cleared on rebuild
2012-12-03 11:32:39 -08:00
Matthew Xie
90bd55f179 am 3b5c4382: am b8e80eb5: am 4fd38e8d: Merge "Clean up debug messages" into jb-mr1.1-dev
* commit '3b5c43825eaf8096c01eac77e03a8aac8e9fab4a':
  Clean up debug messages
2012-12-03 11:30:56 -08:00
Matthew Xie
3b5c43825e am b8e80eb5: am 4fd38e8d: Merge "Clean up debug messages" into jb-mr1.1-dev
* commit 'b8e80eb566aa5afb744db84a0067e144de831f45':
  Clean up debug messages
2012-12-03 11:29:21 -08:00
Matthew Xie
b8e80eb566 am 4fd38e8d: Merge "Clean up debug messages" into jb-mr1.1-dev
* commit '4fd38e8d13697cd1b169487719982f32cc5fb425':
  Clean up debug messages
2012-12-03 11:26:38 -08:00
Matthew Xie
4fd38e8d13 Merge "Clean up debug messages" into jb-mr1.1-dev 2012-12-03 11:23:57 -08:00
Adam Powell
05c8f17f05 Merge "resolver list is not cleared on rebuild" 2012-12-03 11:04:21 -08:00
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
Baligh Uddin
7481fecf04 Import translations. DO NOT MERGE
Change-Id: Ib3112fc5a6ae82de1a37c63d0196ce764d56b18d
Auto-generated-cl: translation import
2012-12-03 10:28:48 -08:00
Baligh Uddin
a4e15c12d8 Import translations. DO NOT MERGE
Change-Id: I3ebc7310e109d45facea00213daacf9d10e22285
Auto-generated-cl: translation import
2012-12-03 10:15:19 -08:00
Baligh Uddin
3f2f8d6df5 Import translations. DO NOT MERGE
Change-Id: Idcd2644aeb1afe111214bad797fb84bf638dd08f
Auto-generated-cl: translation import
2012-12-03 10:13:15 -08:00
Romain Guy
3614394c85 Close InputStream after we're done reading from it
External bug #40837

Change-Id: Ic7f3fefb7aabf4d006f9928b6f67d1263f039487
2012-12-03 10:10:22 -08:00
Chet Haase
3efa7b597c Fix requestLayout-during-layout problems
An earlier fix to allow requestLayout() to be called during layout
didn't handle some of the requests properly, leaving some nodes
stranded with layout requests that didn't propagate all the way
up the hierarchy. The fix is to do, on the second layout pass, exactly
what we do in a normal layout pass: run measure, then layout.

Issue #7657033 Checkboxes not being updated immediately in Settings

Change-Id: I90be3992d3441e8f43629d26c8386c81a7c31482
2012-12-03 08:41:28 -08:00
Marco Nelissen
eff8dadcbd am f688ee5d: Merge "Change the text color of timer in MediaController" into jb-mr1.1-dev
* commit 'f688ee5dcce1c30a0fd2092722bbbfc99ed9d445':
  Change the text color of timer in MediaController
2012-12-03 08:22:01 -08:00
Marco Nelissen
f688ee5dcc Merge "Change the text color of timer in MediaController" into jb-mr1.1-dev 2012-12-03 08:19:51 -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