35634 Commits

Author SHA1 Message Date
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
Jeff Brown
7fcb5dc5e9 Merge "Pin electron beam surface to natural orientation." into jb-mr1.1-dev 2012-12-04 17:15:34 -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
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
d8cb8fa463 Merge "Revised language for notification ringtone picker." into jb-mr1.1-dev 2012-12-04 11:01:04 -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
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
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
Baligh Uddin
a4e15c12d8 Import translations. DO NOT MERGE
Change-Id: I3ebc7310e109d45facea00213daacf9d10e22285
Auto-generated-cl: translation import
2012-12-03 10:15:19 -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
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
Roger Chen
0ce57a92d7 Change the text color of timer in MediaController
The color of timer and backgroud in MediaController
are too closer to distinguish.

Change-Id: Id60ecbc26233857c7ef291ef891c9d4720309dfa
Signed-off-by: Roger Chen <cxr514033970@gmail.com>

Cherrypicked from external contribution.
b/7648349
2012-11-30 12:43:41 -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
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
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
Eric Laurent
c3eb57b22f Merge "AudioService: improve initial safe volume delay" into jb-mr1.1-dev 2012-11-30 09:26:30 -08:00
Baligh Uddin
a1b3b99c7f Merge "Import translations. DO NOT MERGE" into jb-mr1.1-dev 2012-11-29 21:06:23 -08:00
Baligh Uddin
2c2b232b41 am 2138e5c0: Merge "Import translations. DO NOT MERGE" into jb-mr1-dev
* commit '2138e5c0f6b78e0e248945da498bd716c928505f':
  Import translations. DO NOT MERGE
2012-11-29 21:06:04 -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
Robert Greenwalt
b8da0376f2 Secure a handful of framework broadcasts
At least one of these was getting spoofed in the wild.
We don't want to go too far this late in the game, but this is a good start.

bug:7622253
(cherry picked from commit 47918ae3b4e7ebb54711884e9ff9d0300591ab8b)

Conflicts:

	core/res/AndroidManifest.xml

Change-Id: I118b31489fe7add5b8d69289cab9f4e8ab269495
2012-11-29 13:06:23 -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
Baligh Uddin
6abe146700 Import translations. DO NOT MERGE
Change-Id: Ie73d50cbd57de973c7a01c51eedbf807fb7526e4
Auto-generated-cl: translation import
2012-11-29 09:02:02 -08:00
Baligh Uddin
eeac626809 Import translations. DO NOT MERGE
Change-Id: I5ba3917c7ad5b6ec719f22aa79ce6132aea74b39
Auto-generated-cl: translation import
2012-11-29 08:59:36 -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
738b190338 Merge "Import assets from UX" into jb-mr1.1-dev 2012-11-28 18:49:26 -08:00
Adam Powell
20b9cd2064 Import assets from UX
Fixes issues with scaling/dithering artifacts in dialog/menu panel
assets.

Bug 7589786

Change-Id: I1285f9de5f8bcd0decfa7765c1463e444a56b335
2012-11-28 18:41:10 -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