1077 Commits

Author SHA1 Message Date
Dianne Hackborn
0f6f210264 am 7b1af760: am 1bd7d5e4: am 675814d4: Merge "Maybe fix issue #7596986: Frequent runtime restarts; IAE at..." into jb-mr1.1-dev
* commit '7b1af76074423837d26ccb4e3b4c1b5d25baa25e':
  Maybe fix issue #7596986: Frequent runtime restarts; IAE at...
2012-11-30 10:49:08 -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
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
db69db1510 am b8d8562c: am 40ca751b: am ebec2315: Merge "Always report user switched after unfreezing screen." into jb-mr1.1-dev
* commit 'b8d8562cc36e5ab2f8b8c5adfd8d4839fe0909d3':
  Always report user switched after unfreezing screen.
2012-11-29 16:47:16 -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
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
Dianne Hackborn
4d78abfca7 Always report user switched after unfreezing screen.
Change-Id: I58172896892a07e72a3430e56e4d2944d388c7c9
2012-11-29 15:10:18 -08:00
Dianne Hackborn
36893b16ce am 221d59f7: am afdd978c: am 68e0da7e: Merge "Quiet down a lot of logging." into jb-mr1.1-dev
* commit '221d59f723584d316ea225bdaf1bc75cbfd7a794':
  Quiet down a lot of logging.
2012-11-29 14:32:25 -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
Dianne Hackborn
40e9f2922c Quiet down a lot of logging.
Also fix a little problem where the USER_STARTED broadcasts
were not being sent as ordered broadcasts(!).

Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
2012-11-27 19:12:23 -08:00
Dianne Hackborn
816a5d9c27 am 360acd03: am 78551bc7: am ba4ac518: Merge "Improve debugging for issue #7586414: AlarmManager wakelocks held" into jb-mr1.1-dev
* commit '360acd03bfe0d597ee845d2392d715633a89e12b':
  Improve debugging for issue #7586414: AlarmManager wakelocks held
2012-11-27 17:34:11 -08:00
Winson Chung
fb8ca912e8 am d0079891: am 9f6e8ddf: am 2b847c39: Merge "Removing unecessary additional lock metadata from QuickSettings user tile." into jb-mr1.1-dev
* commit 'd0079891e3a8034f560eaf88d5be692b61ca4b9a':
  Removing unecessary additional lock metadata from QuickSettings user tile.
2012-11-27 17:33:46 -08:00
Dianne Hackborn
360acd03bf am 78551bc7: am ba4ac518: Merge "Improve debugging for issue #7586414: AlarmManager wakelocks held" into jb-mr1.1-dev
* commit '78551bc7d5541c86503b32db0e3e2564218bf179':
  Improve debugging for issue #7586414: AlarmManager wakelocks held
2012-11-27 11:36:34 -08:00
Winson Chung
d0079891e3 am 9f6e8ddf: am 2b847c39: Merge "Removing unecessary additional lock metadata from QuickSettings user tile." into jb-mr1.1-dev
* commit '9f6e8ddf5d48a695b26f1d9759696b56952177bd':
  Removing unecessary additional lock metadata from QuickSettings user tile.
2012-11-27 11:36:13 -08:00
Dianne Hackborn
ba4ac51823 Merge "Improve debugging for issue #7586414: AlarmManager wakelocks held" into jb-mr1.1-dev 2012-11-27 11:06:35 -08:00
Dianne Hackborn
8103890a59 Improve debugging for issue #7586414: AlarmManager wakelocks held
In alarm manager, print a summary of the top 10 alarms by time
being executed.  Keep track of execution time (and wake count) of
each type of alarm for each application so this can be printed in
the summary (and used to compute the top 10 alarms).  Rework how
the alarm summary stats are tracked so that we don't need to hold
on to the full Intent for each stat and can get the Intent information
at the time the alarm is sent rather than waiting for whatever Intent
comes back in the result.

Also in the battery stats: sort the kernel wake locks by time, add
a new section showing all partial wake locks across all applications
sorted by time.

Finally a new LocalLog class that is used by AlarmManager to log
important warning messages, so these can also be later found in
its dumpsys output.

Change-Id: Icc07810053e60fb623a49937e696819cb8352b06
2012-11-27 11:05:42 -08:00
Winson Chung
f7614fc744 Removing unecessary additional lock metadata from QuickSettings user tile.
Change-Id: I89ec94385eb3cdd46ad6942bf8989fb04d5c0370
2012-11-26 14:44:03 -08:00
Jeff Sharkey
0ace4de5c2 am f838eb40: am fa0fb7c5: am f6ba84b4: Merge "Reduce verbosity of service event logging." into jb-mr1.1-dev
* commit 'f838eb40e8f53263c10d251ec4ec72f167f82541':
  Reduce verbosity of service event logging.
2012-11-16 10:37:42 -08:00
Jeff Sharkey
f838eb40e8 am fa0fb7c5: am f6ba84b4: Merge "Reduce verbosity of service event logging." into jb-mr1.1-dev
* commit 'fa0fb7c508dfa4275389a52b7c7907d2032f4aaa':
  Reduce verbosity of service event logging.
2012-11-15 11:51:45 -08:00
Jeff Sharkey
f6ba84b424 Merge "Reduce verbosity of service event logging." into jb-mr1.1-dev 2012-11-15 11:44:13 -08:00
Jeff Sharkey
ec14d78cfa am 1aa4f6fe: am 5691474c: am ad08e6dc: Merge "Emit event log message when switching users." into jb-mr1.1-dev
* commit '1aa4f6fe7e150fb60c5f28a9c4dd8ad6fb06984a':
  Emit event log message when switching users.
2012-11-09 22:49:38 -08:00
Jeff Sharkey
1aa4f6fe7e am 5691474c: am ad08e6dc: Merge "Emit event log message when switching users." into jb-mr1.1-dev
* commit '5691474c9cbaeb37eeb659a3adbc05d31d668611':
  Emit event log message when switching users.
2012-11-09 22:45:33 -08:00
Jeff Sharkey
9d6d890e0d Reduce verbosity of service event logging.
Omits service name from destroyed events, since it can be derived by
looking back to the created event with the same ServiceRecord.

Change-Id: Ib7ab1031c0859437735e1fc985d58f47629b7ac4
2012-11-09 17:32:43 -08:00
Jeff Sharkey
86597df79f Emit event log message when switching users.
Change-Id: I8e521e177b0e17e2ab9e033e0ff8bc421cd5f784
2012-11-09 15:09:13 -08:00
Kenny Root
7b172a49a9 am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"
* commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6':
  Correct executable bit for source files
2012-11-07 13:08:25 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Amith Yamasani
7644dbc051 am d02f2313: am 47ece2e5: am 03f7ebfe: Merge "Relax permission requirements for posting notifications across users" into jb-mr1-dev
* commit 'd02f231318014925bead88ce9408c3c37f9a0e8b':
  Relax permission requirements for posting notifications across users
2012-10-31 13:14:30 -07:00
Amith Yamasani
2c7ebeae9f Relax permission requirements for posting notifications across users
Bug: 7430689
Change-Id: I2430b20137705ed2d6dc0f870690acda0662392b
2012-10-30 16:12:54 -07:00
Dianne Hackborn
9221792e0b am e9c9a4ce: am 619eea60: am ecf4725e: Merge "Fix issue #7401818: Wrong transition animation when clearing task" into jb-mr1-dev
* commit 'e9c9a4ce9e9766b8950f34adeedeb7705cadf71e':
  Fix issue #7401818: Wrong transition animation when clearing task
2012-10-24 10:36:30 -07:00
Dianne Hackborn
9622ca4f88 Fix issue #7401818: Wrong transition animation when clearing task
When we are clearing activities off the top of a task, propagate
any activity options down from the top-most one to whatever top
activity we are keeping.  This ensures that if we set the activity
options on the top activity of the task previously to give it the
correct animation, we still keep that animation for the activity
that really ends up being the top.

Change-Id: I6919b644a530ac283fe4d320496edc2bf72aa04e
2012-10-23 18:56:33 -07:00
Jeff Sharkey
b36d3e7614 am f1ad6d5b: am 93b17876: am 5831159b: Merge "More migration to Global settings." into jb-mr1-dev
* commit 'f1ad6d5b79edc4d171700233edcb9b5cdf3937e1':
  More migration to Global settings.
2012-10-18 23:31:20 -07:00
Jeff Sharkey
8d9a1f66d9 More migration to Global settings.
Bug: 7375796
Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
2012-10-18 15:38:14 -07:00
Christopher Tate
597ea5b3cd am d9466f94: am 2f296598: am 1ea75b88: Merge "Sanity-check erroneous backup agent instantiations" into jb-mr1-dev
* commit 'd9466f940ae3f04f8efede13b876d5968ff0e820':
  Sanity-check erroneous backup agent instantiations
2012-10-18 12:25:19 -07:00
Christopher Tate
346acb123d Sanity-check erroneous backup agent instantiations
Two distinct changes:

Fix a bug seen in the wild where a newly-launched application will be
spuriously asked to instantiate a backup agent.  What was happening
there is that some Activity Manager state was being left stale in certain
circumstances, and then in combination with app uninstall / install, there
could be a case where uid reuse wound up looking like an app identity
match.

We now positively verify before instantiating the agent that the intended
backup target package is uid-compatible with the app process that the
instantiation was requested of.  The incomplete bookkeeping in the
Activity Manager has also been tightened up, and the Backup Manager is
more aggressive about cleaning up pending operations pertaining to
apps being uninstalled.

Bug 5874010

Change-Id: Ic389f4a96c9dcd0ba6b3962b579084033d8ae9f8
2012-10-17 13:36:15 -07:00
Dianne Hackborn
49c762f79a am 547c20df: am 48f6b7e2: am 59cb2cf1: Merge "Revert fix to issue #6880627: PendingIntent.getService() returns..." into jb-mr1-dev
* commit '547c20dfc88c7981449fcfdecf7deaa17d6fedc2':
  Revert fix to issue #6880627: PendingIntent.getService() returns...
2012-10-12 17:50:32 -07:00
Dianne Hackborn
861a3b2d4f Revert fix to issue #6880627: PendingIntent.getService() returns...
...stale intent of force stopped app

Fixing this caused other problems elsewhere that we don't have time
to address at this point.

Fixes issue #7338275: Tapping clock home screen widget doesn't open
alarms anymore

Change-Id: Iedc1fae5f62b6ead28d1895d709591358e5d6634
2012-10-12 15:25:20 -07:00
Dianne Hackborn
3c30494d44 am 572286b4: am 31af905a: am 36db9d08: Merge "Further work on issue #7307399: Framework needs a new pre-user-shutdown..." into jb-mr1-dev
* commit '572286b4152245a73ac00ebc69b4bd8fc4bc586d':
  Further work on issue #7307399: Framework needs a new pre-user-shutdown...
2012-10-09 19:17:09 -07:00
Dianne Hackborn
c0bd747b06 Further work on issue #7307399: Framework needs a new pre-user-shutdown...
...phase & callback API

I realized there were a few things wrong with what was there.  The new
ACTION_USER_STARTING was not being sent for the first user at boot, and
there was an existing problem where ACTION_USER_STARTED was sent every
time there was a user switch.

Also improved some debug output of broadcasts to make it easier to see
what is going on in this stuff, and better reporting of why a service
couldn't be started.

Change-Id: Id8a536defbbad1f73d94a37d13762436b822fbe3
2012-10-09 17:57:14 -07:00
Dianne Hackborn
96a739737f am 7beb70a9: am e5456645: am 840590dd: Merge "Fix issue #7311376: Add API to allow apps to know if they are..." into jb-mr1-dev
* commit '7beb70a94af2ce29b4184fd7927bba93d90cf878':
  Fix issue #7311376: Add API to allow apps to know if they are...
2012-10-09 17:53:13 -07:00
Dianne Hackborn
a8a9bd65bf Fix issue #7311376: Add API to allow apps to know if they are...
...running as the foreground user

Add UserManager.isUserRunning() which is the public version of the
existing method on ActivityManager.

Also add UserManager.isUserRunningOrStopping() since that seems like
it will be useful.

And fix the internal function that returns the array of currently
running users to not include stopped users.

Change-Id: I84672fa8748fc027fd402729586b5603f640e498
2012-10-09 17:00:31 -07:00
Dianne Hackborn
94feaa3b3b am a4c88ee9: am 1b94df8a: am 4efbab48: Merge "Framework side of issue #7302511: GCM client needs to use new framework API..." into jb-mr1-dev
* commit 'a4c88ee991e452d0adbc3a5f1bcdc00a68afcc77':
  Framework side of issue #7302511: GCM client needs to use new framework API...
2012-10-08 16:22:17 -07:00
Dianne Hackborn
36d337adff Framework side of issue #7302511: GCM client needs to use new framework API...
...to fix background->shutdown delivery race

Add ACTION_STOPPING and ACTION_STARTING to allow such apps to keep track of
which users are started/stopped, and be involved in the process of stopping
a user.

Also get rid of the scale part of the wallpaper transitions, since it seems
like I have still failed at getting the user switch to wait until the new
wallpaper is displayed.

Change-Id: If7e8fdae3544a9d7987a1b9274dc8b49022f6f62
2012-10-08 14:33:47 -07:00
Amith Yamasani
1a8d0f7a94 am 45e3c4f0: am 1409c99f: am 9c2a38ed: Merge "Fix resource reading for secondary users" into jb-mr1-dev
* commit '45e3c4f0c75eafc1ee6d3fe97d42992eab6c3741':
  Fix resource reading for secondary users
2012-10-07 23:44:35 -07:00
Amith Yamasani
9c2a38ed10 Merge "Fix resource reading for secondary users" into jb-mr1-dev 2012-10-07 22:53:18 -07:00
Amith Yamasani
64442c1155 Fix resource reading for secondary users
Bug: 7086881

Load resources for the correct user.

Also clean up package monitoring and locking.
Added dump method to SearchManagerService.

Sneaking in a change to make crash dialogs visible to current user.

Change-Id: Id56dd15428d66084de995e28be242db27c15fda3
2012-10-07 15:56:34 -07:00
Craig Mautner
8565363126 am 337aa27a: am 8ee7ac22: am 33877e15: Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
* commit '337aa27a6307e0f40705ee676551dda4bf6cb894':
  Adds showWhenLocked attribute to Activities.
2012-10-07 11:55:58 -07:00
Craig Mautner
33877e15b8 Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev 2012-10-07 11:48:50 -07:00
Craig Mautner
5962b12bed Adds showWhenLocked attribute to Activities.
The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
2012-10-06 13:09:58 -07:00
Adam Cohen
c5bbd1c6a5 am 451d49b3: am a39c5c36: am 327424d6: Merge "Plumbing to allow keyguard to be shown with user switcher (issue 7175023)" into jb-mr1-dev
* commit '451d49b34c8399a3479ca96addcc11857b6afb3e':
  Plumbing to allow keyguard to be shown with user switcher (issue 7175023)
2012-10-04 18:08:36 -07:00