28047 Commits

Author SHA1 Message Date
Daniel Sandler
bc305e5544 Merge "Fix longstanding nonsense in javadocs." into jb-mr1.1-dev 2012-12-06 11:31:50 -08:00
Adam Cohen
29cfce7a38 Merge "Making sure to clear state related to views that are being recycled (issue 7650538)" into jb-mr1.1-dev 2012-12-06 11:02:58 -08:00
Adam Cohen
ff06719077 Making sure to clear state related to views that are being recycled (issue 7650538)
Change-Id: I5161ac261f963789537d2066a472cd3036c218aa
2012-12-06 11:01:09 -08:00
Fabrice Di Meglio
b3b2922b10 Merge "Fix bug #7649607 Hebrew text is cut off in Settings" into jb-mr1.1-dev 2012-12-05 17:17:35 -08:00
Craig Mautner
ddd75cb1ac Merge "Fix NPE when showing Toast from system process." into jb-mr1.1-dev 2012-12-05 12:24:25 -08:00
Chris Craik
07efb0303f Merge "Defer process mode upon draw" into jb-mr1.1-dev 2012-12-05 12:22:41 -08:00
Craig Mautner
54ae2f389c Fix NPE when showing Toast from system process.
The system process has no ApplicationContext and consequently was
returning null. Use the base Context in these cases.

Bug 7673699 fixed.

Change-Id: Ie2ab856bb0baefff44775a12bef7802320f72656
2012-12-05 09:57:44 -08:00
Amith Yamasani
6c58b155c3 Merge "Make 3rd party lockscreen widgets work on secondary users" into jb-mr1.1-dev 2012-12-05 05:45:00 -08:00
Daniel Sandler
8aa9ae69a2 Fix longstanding nonsense in javadocs.
Change-Id: Iea2c7b8e5dc7591a9586a628e891d71d215daec6
2012-12-04 23:32:27 -05:00
Fabrice Di Meglio
4e46d0fdef Fix bug #7649607 Hebrew text is cut off in Settings
- in RTL mode and wrap content, make RelativeLayout respect the width that can be  passed to him

Change-Id: I6029135dede1ee80e41ae1bc2a337bf52cf24445
2012-12-04 18:13:48 -08:00
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
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
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
Matthew Xie
4fd38e8d13 Merge "Clean up debug messages" into jb-mr1.1-dev 2012-12-03 11:23:57 -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
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
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
ce463847db Merge "Fix bug #7651552 resetRtlProperties() is called way too often" into jb-mr1.1-dev 2012-11-30 16:37:17 -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
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
Eric Laurent
c3eb57b22f Merge "AudioService: improve initial safe volume delay" into jb-mr1.1-dev 2012-11-30 09:26:30 -08:00
Matthew Xie
d77982ef29 Clean up debug messages
bug 7626174

Change-Id: I65cdcaf2c48a78468b6cef0b8591289435068b24
2012-11-29 20:26:19 -08:00
Eric Laurent
05274f348e AudioService: improve initial safe volume delay
AudioService relies on a valid mmc in order to enforce the headset
volume limitation or not. There is a timeout to enforce the limitation
if no mcc is configured after boot.
Until this timeout is reached or a valid SIM is detected the headset
volume is not limited.

This change makes that the last known volume limitation state (enforced or
not) is persisted so that next time we boot, last known state is applied until
a new mcc is configured if any. In most cases, the mcc does not change from one
boot to the next and we do the right thing. If teh mcc does change, the correct
policy will be enforced when the mcc is detected or after the timeout.

Also fix a bug where the volume panel was not displayed if the limitation mechanism
is triggered at the first press on VOL+ key.

Bug 7455275.

Change-Id: Id0f2996d893d38c6a14f4f9e4a0e9e3be17ef127
2012-11-29 17:46:05 -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
Daniel Sandler
c08cd02649 Add constant for Daydream settings.
Bug: 7480927
Change-Id: I383170c6c543b5ffe81568d273389585498d369b
2012-11-29 15:24:39 -05:00
Dianne Hackborn
38e8470049 Merge "Fix issue #7585876: When changing the font settings, the movie..." into jb-mr1.1-dev 2012-11-29 12:05:33 -08:00
Dianne Hackborn
7ac8bbddfc Fix issue #7585876: When changing the font settings, the movie...
...just keeps attempting to load and doesn't play on the TV

Change-Id: Ifcdc969a037a113224632f907d55f60a168dd05a
2012-11-29 11:59:58 -08:00
zzy
652678af4d timeout support for accept() and added check for signal size
bug 7592240

Change-Id: Ide1868da669c190cdfed90f7af3f739ec9da690b
2012-11-28 22:12:27 -08:00
Fabrice Di Meglio
cdc6d5cf88 Merge "Fix bug #7617883 RelativeLayout is not having the correct width when in RTL mode" into jb-mr1.1-dev 2012-11-28 19:08:45 -08:00
Adam Powell
66cedab63b Merge "Fix time-related ScaleGestureDetector methods" into jb-mr1.1-dev 2012-11-28 19:06:51 -08:00
Adam Powell
10479a29cb Merge "Clean up behavior of type arguments for MediaRouter#getSelectedRoute" into jb-mr1.1-dev 2012-11-28 19:03:01 -08:00
Adam Powell
7232b0ad67 Fix time-related ScaleGestureDetector methods
Bug 7626515

Change-Id: Ie7abf9c166284a74b4e7bcf9de25520cf08e3b2d
2012-11-28 18:29:22 -08:00
Dianne Hackborn
860d0cd452 Merge "Cleaner initial boot." into jb-mr1.1-dev 2012-11-28 18:19:25 -08:00
Dianne Hackborn
13579ed330 Cleaner initial boot.
This does some cleanup of the initial boot, especially when
booting in "no core apps" mode for encryption/decryption.

Change-Id: Ifb3949f580e52f54559e603c4b0b104f6bac2f6c
2012-11-28 18:09:01 -08:00
Adam Cohen
035352b4d6 Merge "Making sure keyguard and homescreen only display eligible widgets (issue 7550090)" into jb-mr1.1-dev 2012-11-28 17:47:22 -08:00
Fabrice Di Meglio
13705eda8c Fix bug #7617883 RelativeLayout is not having the correct width when in RTL mode
- fix onMeasure() in RTL mode: need to compute width before computing layout params
that are used for layout
- fix getRelatedView() so that it uses the resolved rules
- add some extra "final" statements

Change-Id: I7c3bf841cd18c5f77b010a9be20fa78069e88d94
2012-11-28 17:13:54 -08:00
Adam Cohen
d9e5af3851 Making sure keyguard and homescreen only display eligible widgets (issue 7550090)
Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
2012-11-28 16:36:56 -08:00
Fabrice Di Meglio
71175f727b Merge "Fix bug #7621927 Radio button/TextView drawable regression in 4.2" into jb-mr1.1-dev 2012-11-28 15:05:55 -08:00
Dianne Hackborn
68e0da7e39 Merge "Quiet down a lot of logging." into jb-mr1.1-dev 2012-11-28 15:03:39 -08:00
Fabrice Di Meglio
b878ddb56e Fix bug #7621927 Radio button/TextView drawable regression in 4.2
- as we remove the 9 patch padding trick, we need also to do the correct
positioning of the radio / checkbox / star during draw

Change-Id: I02b67bef9c0f2dc1c0c65361de14ab20ce9b881d
2012-11-28 11:59:27 -08:00
Adam Powell
1cf2ca8358 Clean up behavior of type arguments for MediaRouter#getSelectedRoute
MediaRouter's policy so far has been around a single selected route,
but when route types are entirely orthogonal this should not be the
case. However we still don't want to get into a situation where we
have multiple, very different routes selected for different types at
the same time, we still want to have more of an element of
predictability.

Behavior of getSelectedRoute is now:

* If the selected route matches at least one type with the requested
  type flags, it is still considered selected for that request.

* If the caller specifically requested the selected user route and the
  currently selected route is not a user route, return null.

* If the requested type flags do not match any types with the selected
  route, return the default system route.

Note that this is "any" behavior instead of "all" - this matches
existing usage of the method. We may consider adding an "all" variant
later on.

Bug 7588042

Change-Id: I3a79d8153ca6b882fd3ef6b9b1de8f538873dec2
2012-11-28 11:22:01 -08:00
Scott Main
7538ff0920 am 35473e6e: Merge "docs: update dreamservice description" into jb-mr1-dev
* commit '35473e6e6d2d17c859173ca0cf0dfdcfcb0b4663':
  docs: update dreamservice description
2012-11-28 10:40:18 -08:00