11746 Commits

Author SHA1 Message Date
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
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
Craig Mautner
3351ab27b9 am f967500e: am 46732445: Merge "Include child windows when looking for insertion point." into jb-mr1.1-dev
* commit 'f967500ebaefb95d7a1c14acd05574a0f17ec078':
  Include child windows when looking for insertion point.
2012-11-30 16:46:03 -08:00
Craig Mautner
f967500eba am 46732445: Merge "Include child windows when looking for insertion point." into jb-mr1.1-dev
* commit '46732445b4c02c225544851cb6cf848ec0583494':
  Include child windows when looking for insertion point.
2012-11-30 16:42:56 -08:00
Craig Mautner
7b1aa77a9b Include child windows when looking for insertion point.
After finding a window in the window list we turn around and look in
the AppWindowToken.windows list for it. If it is a child of a window
in that list we should use the parent windows index as the search
result. Instead we gave up and ended up inserting the window at the
beginning of the windows list.

Bug 7357465 fixed.

Change-Id: If77f343b8597bfbb0b7fa41dedf7972d78d03020
2012-11-30 16:14:45 -08:00
Martijn Coenen
1b3a4362a0 am f77445cd: am b1a01ab0: Merge "Allow the NFC process to call Bluetooth APIs." into jb-mr1.1-dev
* commit 'f77445cd48f9174647c4c7ff539036b5aa08ce6e':
  Allow the NFC process to call Bluetooth APIs.
2012-11-30 11:11:44 -08:00
Martijn Coenen
f77445cd48 am b1a01ab0: Merge "Allow the NFC process to call Bluetooth APIs." into jb-mr1.1-dev
* commit 'b1a01ab01c2aa5136f7781c3a6ec682590e38ac4':
  Allow the NFC process to call Bluetooth APIs.
2012-11-30 11:09:43 -08:00
Martijn Coenen
b1a01ab01c Merge "Allow the NFC process to call Bluetooth APIs." into jb-mr1.1-dev 2012-11-30 11:08:07 -08:00
Dianne Hackborn
7b1af76074 am 1bd7d5e4: am 675814d4: Merge "Maybe fix issue #7596986: Frequent runtime restarts; IAE at..." into jb-mr1.1-dev
* commit '1bd7d5e47ed7e73c244b79c5a92d6af1e3e89266':
  Maybe fix issue #7596986: Frequent runtime restarts; IAE at...
2012-11-30 10:47:01 -08:00
Dianne Hackborn
1bd7d5e47e am 675814d4: Merge "Maybe fix issue #7596986: Frequent runtime restarts; IAE at..." into jb-mr1.1-dev
* commit '675814d488579582e0214cc720d9ccc310173f25':
  Maybe fix issue #7596986: Frequent runtime restarts; IAE at...
2012-11-30 10:45:02 -08:00
Dianne Hackborn
675814d488 Merge "Maybe fix issue #7596986: Frequent runtime restarts; IAE at..." into jb-mr1.1-dev 2012-11-30 10:42:15 -08:00
Dianne Hackborn
a55097f8bb am ed74c10f: am aae329ef: Merge "Don\'t apply transformation fudge when not rotating." into jb-mr1.1-dev
* commit 'ed74c10f135c768b24c4b1a14042b8292a9662fa':
  Don't apply transformation fudge when not rotating.
2012-11-29 17:59:30 -08:00
Dianne Hackborn
ed74c10f13 am aae329ef: Merge "Don\'t apply transformation fudge when not rotating." into jb-mr1.1-dev
* commit 'aae329ef0f68e30897faef55c86548dab0eadf37':
  Don't apply transformation fudge when not rotating.
2012-11-29 17:56:58 -08:00
Dianne Hackborn
aae329ef0f Merge "Don't apply transformation fudge when not rotating." into jb-mr1.1-dev 2012-11-29 17:53:47 -08:00
Dianne Hackborn
4b16969b00 Don't apply transformation fudge when not rotating.
There is this stupid fudge factor applied to window transformations
when doing a screen rotation animation.  We need this when rotating,
but when not rotating it causes very visible artifacts.  Historically
the non-rotation case only happened due to configuration changes, so
wasn't that big a deal.  Now however that we use this when switching
users, it is more annoying.  So get rid of it for such cases.

Change-Id: I6b343866c1bad9b16984b4a629917c2f1bb37b9e
2012-11-29 17:51:24 -08:00
Dianne Hackborn
b8d8562cc3 am 40ca751b: am ebec2315: Merge "Always report user switched after unfreezing screen." into jb-mr1.1-dev
* commit '40ca751ba0980685ce03bc3b6877b5f8163b30a5':
  Always report user switched after unfreezing screen.
2012-11-29 16:44:14 -08:00
Dianne Hackborn
40ca751ba0 am ebec2315: Merge "Always report user switched after unfreezing screen." into jb-mr1.1-dev
* commit 'ebec2315353941890471aa901e87f19f681d007a':
  Always report user switched after unfreezing screen.
2012-11-29 16:41:44 -08:00
Dianne Hackborn
ebec231535 Merge "Always report user switched after unfreezing screen." into jb-mr1.1-dev 2012-11-29 16:38:23 -08:00
Dianne Hackborn
6c5406acd7 Maybe fix issue #7596986: Frequent runtime restarts; IAE at...
...android.os.Parcel.nativeAppendFrom(Native Method)

The failing stack trace is:

11-20 20:29:04.365 19154 19170 E AndroidRuntime: java.lang.IllegalArgumentException
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.nativeAppendFrom(Native Method)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.appendFrom(Parcel.java:428)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Bundle.writeToParcel(Bundle.java:1613)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeBundle(Parcel.java:605)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.location.Location.writeToParcel(Location.java:903)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeParcelable(Parcel.java:1254)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeValue(Parcel.java:1173)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeMapInternal(Parcel.java:591)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Bundle.writeToParcel(Bundle.java:1619)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeBundle(Parcel.java:605)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.location.Location.writeToParcel(Location.java:903)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeParcelable(Parcel.java:1254)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeValue(Parcel.java:1173)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeMapInternal(Parcel.java:591)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Bundle.writeToParcel(Bundle.java:1619)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.os.Parcel.writeBundle(Parcel.java:605)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.content.Intent.writeToParcel(Intent.java:6660)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at android.app.ApplicationThreadProxy.scheduleReceiver(ApplicationThreadNative.java:763)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at com.android.server.am.BroadcastQueue.processCurBroadcastLocked(BroadcastQueue.java:230)
11-20 20:29:04.365 19154 19170 E AndroidRuntime:        at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:777)

This is odd because where we do Bundle.writeToParcel(), we are just writing the Parcel
we have with its current length.  There is no way this should be able to fail like this...
unless the Bundle is changed while we are running?

Hm.

It looks like the location manager is holding on to Location objects which have a
Bundle of extras.  It is that Bundle of extras that the crash is happening on.
And the bundle extras can be changed as it operates.  And there are places where
the raw Location object is returned from the location manager, which means the
caller can be olding on to a Location object whose extras can be changed at any
time by other threads in the location manager.

So that seem suspicious.

This change should take care of all these places in the location manager, by
making sure to copy the location object before it goes out of the location
manager.

In addition, add some code to the activity manager to not bring down the entire
system if there is a problem trying to send one of these broadcasts.  There is
no need, we can just skip the broadcast as bad.

Change-Id: I3043c1e06f9d2931a367f831b6a970d71b0d0621
2012-11-29 16:33:54 -08:00
Zhihai Xu
1d8ea03609 am ec7a8b6f: am e1a867f6: Merge " BluetoothManagerService call should allow SYSTEM_UID" into jb-mr1.1-dev
* commit 'ec7a8b6f74f73738586413875fa8f7cc27c4e8f7':
  BluetoothManagerService call should allow SYSTEM_UID
2012-11-29 16:08:28 -08:00
Zhihai Xu
ec7a8b6f74 am e1a867f6: Merge " BluetoothManagerService call should allow SYSTEM_UID" into jb-mr1.1-dev
* commit 'e1a867f68d3727908be1c2cfc90a5ba6a5785c17':
  BluetoothManagerService call should allow SYSTEM_UID
2012-11-29 16:06:17 -08:00
Zhihai Xu
e1a867f68d Merge " BluetoothManagerService call should allow SYSTEM_UID" into jb-mr1.1-dev 2012-11-29 16:03:49 -08:00
Zhihai Xu
6eb7652b04 BluetoothManagerService call should allow SYSTEM_UID
bug 7561429

Change-Id: I1483bfe1361f71c7ae3529ea496b33504b95413e
2012-11-29 15:41:04 -08:00
Dianne Hackborn
4d78abfca7 Always report user switched after unfreezing screen.
Change-Id: I58172896892a07e72a3430e56e4d2944d388c7c9
2012-11-29 15:10:18 -08:00
Colin Cross
372bb2380d am 418af932: am 05db19bc: Merge "trigger kernel blocked stack trace on system server watchdog" into jb-mr1.1-dev
* commit '418af9323fcb2363636bf4072c230a8adebfcc86':
  trigger kernel blocked stack trace on system server watchdog
2012-11-29 14:28:33 -08:00
John Spurlock
a3aef5ff62 am 43658bae: am 143d73da: Merge "Fix multiuser bug in StatusBarManagerService." into jb-mr1.1-dev
* commit '43658bae9cdb5307d54fa36f3e57def9d0991150':
  Fix multiuser bug in StatusBarManagerService.
2012-11-29 14:28:18 -08:00
Craig Mautner
d08fc86964 am 4317b341: am 24d966a3: Merge "Fix math errors causing black screen. DO NOT MERGE" into jb-mr1.1-dev
* commit '4317b3418b144c162634ec647df76a484ac35612':
  Fix math errors causing black screen. DO NOT MERGE
2012-11-29 14:27:43 -08:00
Dianne Hackborn
b2e18e91ec am b443ddbb: am 2c41c4a2: Fix build.
* commit 'b443ddbbc7f1c7ed2d30310f80323cd4a5bf3e8d':
  Fix build.
2012-11-29 14:26:45 -08:00
Dianne Hackborn
5007dea96e am bac91ebd: am 860d0cd4: Merge "Cleaner initial boot." into jb-mr1.1-dev
* commit 'bac91ebdd0ae310a6b92a8b4bb91613025238356':
  Cleaner initial boot.
2012-11-29 14:26:37 -08:00
Adam Cohen
20b9edd805 am 224daede: am 035352b4: Merge "Making sure keyguard and homescreen only display eligible widgets (issue 7550090)" into jb-mr1.1-dev
* commit '224daede9e49f53ca5246aed66d152bfcc6d64e1':
  Making sure keyguard and homescreen only display eligible widgets (issue 7550090)
2012-11-29 14:26:29 -08:00
Irfan Sheriff
61b00239dd am 0cec3de3: am b4d5a9e7: Merge "WFD: Fallback to PIN mode if PBC is not supported" into jb-mr1.1-dev
* commit '0cec3de3374a861497ff7eeada94865e85896971':
  WFD: Fallback to PIN mode if PBC is not supported
2012-11-29 14:26:04 -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
Colin Cross
418af9323f am 05db19bc: Merge "trigger kernel blocked stack trace on system server watchdog" into jb-mr1.1-dev
* commit '05db19bc55962374812775bf7d980d83ca4f6c3e':
  trigger kernel blocked stack trace on system server watchdog
2012-11-29 12:49:46 -08:00
Colin Cross
05db19bc55 Merge "trigger kernel blocked stack trace on system server watchdog" into jb-mr1.1-dev 2012-11-29 12:47:54 -08:00
Zhihai Xu
aaa453dbbd am 2c7dac19: am e3f7c452: Merge "Settings shows it is connected to A2DP, though the device is not actually connected" into jb-mr1.1-dev
* commit '2c7dac19dd2cab68587cd129b45ad593f7bfdc44':
  Settings shows it is connected to A2DP, though the device is not actually connected
2012-11-29 12:45:09 -08:00
Colin Cross
5df1d871fe trigger kernel blocked stack trace on system server watchdog
Bug b/7638530 may be caused by a kernel deadlock when killing
processes under low memory conditions.  Write to /proc/sysrq-trigger
to get a kernel log of blocked tasks before killing the system server.

Bug: 7638530
Change-Id: I60df324ad4affdadbf13650099dc4dfb38722420
2012-11-29 12:44:09 -08:00
John Spurlock
43658bae9c am 143d73da: Merge "Fix multiuser bug in StatusBarManagerService." into jb-mr1.1-dev
* commit '143d73dab5bf3fe6b8835660543d3d03e781618f':
  Fix multiuser bug in StatusBarManagerService.
2012-11-29 11:48:48 -08:00
John Spurlock
143d73dab5 Merge "Fix multiuser bug in StatusBarManagerService." into jb-mr1.1-dev 2012-11-29 11:45:57 -08:00
John Spurlock
8f3e6d5c83 Fix multiuser bug in StatusBarManagerService.
First, do no harm.

Bug:7638210
Change-Id: I113b574a021d601b0c79d65a3b4b72eeb4c667ad
2012-11-29 14:18:35 -05:00
Martijn Coenen
8385c5afbd Allow the NFC process to call Bluetooth APIs.
The NFC process used to be only running as user 0,
and it may be calling into Bluetooth. Most of the
handover code has now moved to a separate process
running as the current user.

Fix the existing checks to take into account the
correct NFC UID, whatever user it is running as.

Bug: 7309141
Change-Id: I953cfb263a28aef7fe1be5880b053425dc359a29
2012-11-29 10:17:47 -08:00
Craig Mautner
4317b3418b am 24d966a3: Merge "Fix math errors causing black screen. DO NOT MERGE" into jb-mr1.1-dev
* commit '24d966a3b6a0407076b333ec2e074160b2311cb2':
  Fix math errors causing black screen. DO NOT MERGE
2012-11-29 09:59:45 -08:00
Craig Mautner
24d966a3b6 Merge "Fix math errors causing black screen. DO NOT MERGE" into jb-mr1.1-dev 2012-11-29 09:57:15 -08:00
Craig Mautner
9dd9e0c99d Fix math errors causing black screen. DO NOT MERGE
Turning off animations in the Developer options creates a ValueAnimator
duration scale of 0. This is used as the denominator in RampAnimator
which, if the numerator is also 0, sets mAnimatedValue to NaN. Rounding
NaN to the nearest int produces 0 which is then assigned to
mScreenBrightness in DisplayPowerState.

A copy mistake which assigned mTransitionAnimationScale as the default
value for mAnimatorDurationScale in WindowManagerService is also
fixed here.

Bug 7515609 fixed.

Change-Id: I39f8d0a7abdd5a1fe70d757fe95fbddaf7a0ed51
2012-11-29 00:11:50 -08:00
Dianne Hackborn
b443ddbbc7 am 2c41c4a2: Fix build.
* commit '2c41c4a2766dcce506fc0e9e361fc8198553293c':
  Fix build.
2012-11-28 19:48:57 -08:00
Dianne Hackborn
2c41c4a276 Fix build.
Change-Id: Icc1f2913b4e889609066b0ff1dddcd9be0230897
2012-11-28 18:46:45 -08:00
Dianne Hackborn
bac91ebdd0 am 860d0cd4: Merge "Cleaner initial boot." into jb-mr1.1-dev
* commit '860d0cd452529e7a01152582e6535c2129a46af7':
  Cleaner initial boot.
2012-11-28 18:21:47 -08:00
Dianne Hackborn
860d0cd452 Merge "Cleaner initial boot." into jb-mr1.1-dev 2012-11-28 18:19:25 -08:00
Adam Cohen
224daede9e am 035352b4: Merge "Making sure keyguard and homescreen only display eligible widgets (issue 7550090)" into jb-mr1.1-dev
* commit '035352b4d62e259c86576dd3d1495b21bed172ff':
  Making sure keyguard and homescreen only display eligible widgets (issue 7550090)
2012-11-28 18:18:32 -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