14081 Commits

Author SHA1 Message Date
Dianne Hackborn
f406e23012 Merge "More work on procstats: save/restore state, fixes." 2013-06-29 02:14:10 +00:00
Dianne Hackborn
904a857d5a More work on procstats: save/restore state, fixes.
We now persistent the current procstats to storage
to keep them across boots.  Still need to do division
and pruning across days; right now they will just keep
collecting forever.

Also fix some bugs in the checkin output.

Change-Id: I4dd9317dbe2ee0642af8f2f0be1f2bd9c4055e80
2013-06-28 18:45:46 -07:00
Elliott Hughes
6e7affeb3d am b8292830: resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp
* commit 'b8292830f79fc76ffb9a1be5cd316212ac494d03':
  Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
2013-06-28 16:53:27 -07:00
Elliott Hughes
b8292830f7 resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp
Change-Id: I3349f8d2e6715171e2677c1385122ceb2810c1f6
2013-06-28 16:50:13 -07:00
Elliott Hughes
a920f25fe5 resolved conflicts for merge of fca0f92e to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
2013-06-28 16:41:19 -07:00
Elliott Hughes
d396a448b2 Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
2013-06-28 16:24:48 -07:00
Craig Mautner
a8a90e0f52 Set focus to launcher activity on return.
Setting the focus to the top activity on the home stack when
changing stack. This got lost when setting the stack to the foreground
no longer set automatically set focus.

Fixes first half of bug 9580068.

Change-Id: Ic9a662579399c052e0f0992651a32094f4aa62d0
2013-06-28 15:24:50 -07:00
Georgi Nikolov
44c4ddfd47 Bugfix 9603757
master/flo tremendous Gallery battery drain on idle device (syncing pathology?)

Change-Id: I52797fe428a817ac0bdafcf2ab2b0b565839f84c
2013-06-28 14:12:09 -07:00
Daniel Sandler
8751a9644d Merge "move scoring, sound, vibration, and lights into a handler" 2013-06-28 16:36:11 +00:00
Lorenzo Colitti
861c3fcaf2 464xlat: use a gatewayed route, not point-to-point
Various applications such as Skype and our legacy VPN code
do not understand routes pointed directly at point-to-point
interfaces and require a default gateway IPv4 address in
order to function.

Grudgingly accept that routes without default gateways Are Hard
and use gatewayed routes instead. This causes routing to go from:

default dev clat4  scope link

to:

default via 192.0.0.4 dev clat4  scope link
192.0.0.4 dev clat4  scope link

and those apps now work.

Bug: 9597256
Bug: 9597516
Change-Id: I7b7890873802d3cb99affd6eb70b8ab75e7a2cf6
2013-06-29 00:14:43 +09:00
Dianne Hackborn
2179a522d3 Merge "Start really collecting PSS data for process stats." 2013-06-28 01:59:24 +00:00
Dianne Hackborn
cfc837f7fa Start really collecting PSS data for process stats.
The activity manager now uses some heuristics to try to
sample PSS data from processes so that it can get enough
data to over reasonable time have something useful, without
doing it too aggressively.

The current policy is:

1. Whenever a significant global change happens (memory state,
   sceen on or off), we collect PSS from all processes; this will
   not happen more than every 10 minutes.
2. When all activities become idle, we will collect PSS from the
   current top process; this will not happen more than every 2
   minutes per process.
3. We will sample the top-most process's PSS every 5 minutes.
4. When an process's oom adj changes and it has been more than
   30 minutes since PSS has been collected from it, we will
   collect a new PSS sample.
5. If a process changes from service A to service B (meaning it
   has been running a service for a long time), we will collect
   a PSS sample from it.
6. If someone explicitly requests PSS data (for running services
   UI or dumpsys), record that.

Also:

- Finish moving the procstats output all to the new format.
- Record information about processes being killed due to excessive
  wake locks or CPU use in procstats.
- Rework how we structure common vs. per-package process stats to
  make it simpler to deal with.
- Optimize the Debug.getPss() implementation (we use it a lot now).
  Should probably optimize it further at some point.

Change-Id: I179f1f7ae5852c7e567de4127d8457b50d27e0f0
2013-06-27 18:56:00 -07:00
Jeff Sharkey
a3416020a8 Merge "Avoid legacy VPN bringing down system server." 2013-06-27 21:58:20 +00:00
Jeff Sharkey
421fab8a7b Avoid legacy VPN bringing down system server.
Bug: 9564691
Change-Id: I5b5f78c9ae20505f6274b91bc8fdbaaf57443277
2013-06-27 14:51:52 -07:00
Craig Mautner
5729b81ab5 Merge "Add API to convert translucent Activity to opaque." 2013-06-27 21:00:44 +00:00
Scott Greenwald
9b05c61a87 move scoring, sound, vibration, and lights into a handler
As a prelude to introducing fancier scoring functions, this CL
moves scoring and everything that depends on it into a handler.
This allows the NotificationManagerService to report back to the
calling process right away about whether or not the notification
is valid; not blocking while score is computed, and non-statusbar
notification modalities are activated.

Change-Id: Iaf77bc89544bb7bcb7adeda60885d74c3170541c
2013-06-27 16:57:22 -04:00
Dianne Hackborn
97e1d53d36 Merge "Fix issue #9586838: Crash after waking up Hammerhead device" 2013-06-27 20:25:59 +00:00
Dianne Hackborn
ebe830683e Fix issue #9586838: Crash after waking up Hammerhead device
Change-Id: I114306871f02b2461619e8a1cc9652f343edd117
2013-06-27 12:42:13 -07:00
Craig Mautner
8cbafbe6d2 Merge "Add debug for specific bug." 2013-06-27 19:29:05 +00:00
Craig Mautner
e7c58b6d7d Add debug for specific bug.
To be removed once the bug is fixed.

Change-Id: Ie273d4503bb0b534af0e9efe8f45c573766e9a74
2013-06-27 11:52:04 -07:00
Dianne Hackborn
053f61d6a6 Work on issue #9586838: Crash after waking up Hammerhead device
I made the power manager more rigid, not allowing different uids
to use the same wake lock.  This never should happen.  I would
guess there is somewhere that the activity manager is acquiring
the wake lock without clearing the calling identity...  but it is
hard to follow all the paths this may happen in.  So here we add
some checks when acquiring/releasing the wake lock to make sure
it is being done as the system uid.

Also:

- Protect the new activity stack calls with a permission, and
make sure to clear the calling uid once past that.
- Collect uid data from process stats so we can correctly
associate CPU use with a uid even if we don't know about the
pid for some reason.
- Fix battery stats dump commands to clear calling uid before
executing so they aren't broken.

Change-Id: I0030d4f7b614e3270d794ecfc3669139a5703ce9
2013-06-26 19:17:15 -07:00
Dianne Hackborn
49e9c44c4b Merge "Add new ActivityManager.isLowRamDevice()." 2013-06-26 23:16:48 +00:00
Amith Yamasani
5fa9f2b127 Merge "Single-user restrictions" 2013-06-26 23:04:32 +00:00
Dianne Hackborn
b4e1249493 Add new ActivityManager.isLowRamDevice().
This and the old isHighEndGfx() is set up through a
device configuration, rather than trying to compute it
automatically.

Change-Id: Ibc95c05791023a7ae6c88555b75bb61f2b613991
2013-06-26 15:50:02 -07:00
Georgi Nikolov
e738c13d11 Merge "Bugfix 9373708 JBMR2 runtime restart (system process crash in the sync manager) during setup" 2013-06-26 22:11:32 +00:00
Christopher Tate
46eadae12f Make sure to propagate privileged status when upgrading an app
Bug 9470309

Change-Id: Ibc0c8b2fa01da1bd5f5b6ed5530a6bd9a1384846
2013-06-26 14:22:21 -07:00
Dianne Hackborn
49a31e0d67 Merge "Update procstats to start collecting/reporting pss." 2013-06-26 21:11:49 +00:00
Georgi Nikolov
dbe846b02e Bugfix 9373708
JBMR2 runtime restart (system process crash in the sync manager) during setup

The fix is to ensure that all access to SyncStatusInfo and related objects happens
while holding the mAuthority lock or is on a per-thread copy of the objects

Also, includes an unrelated fix for a bug I just noticed in the way
dumpSyncState() prints the periodic sync info

Change-Id: Id9e4dff41029412e133bdabc843d555434d9a12f
(cherry picked from commit 182ff3acbad9850b40d37ad1c23106be6eda8476)
2013-06-26 20:16:05 +00:00
Robert Greenwalt
505e35bca9 am c869696e: am 65f7a95f: am 2f50097a: Merge "Fix power issues around wifi scans." into jb-mr2-dev
* commit 'c869696ef3c1dca3efbc6ce8ab804e8a1b117900':
  Fix power issues around wifi scans.
2013-06-26 11:54:55 -07:00
Dianne Hackborn
13ac041b9f Update procstats to start collecting/reporting pss.
Completely reworked how it manages its data, since trying
to keep track of all of the possible pss data with the old
data structures would have made it huge.  Now we have a sparse
data structure for pss and process times.  (Will switch service
times over to it soon.)

Currently the only thing that collects pss data is running
"dumpsys meminfo".  More will be added later.

Modified checkin output to also scale better as more distinct
data categories are added, and added output of pss data.  Now
instead of dumping every possible entry as a comma-separated
list, it dumps a comma-separated list of only the entries with
data, tagged with the state they go with.

Also fixed some problems in the checkin reporting of batterystats
(it needs to escape commas), added checkin reporting of the history
list, fixed parsing of kernel wake locks to strip quotes, fixed
wake lock name that the sync manager generates to be more sane.

Change-Id: Ibf4010838a9f685ebe1d93aff86c064ccc52b861
2013-06-26 11:45:36 -07:00
Robert Greenwalt
c869696ef3 am 65f7a95f: am 2f50097a: Merge "Fix power issues around wifi scans." into jb-mr2-dev
* commit '65f7a95fc4c06127e7372bcb0d14e561cc23dd80':
  Fix power issues around wifi scans.
2013-06-26 10:55:00 -07:00
Robert Greenwalt
2f50097a5d Merge "Fix power issues around wifi scans." into jb-mr2-dev 2013-06-26 17:43:39 +00:00
Robert Greenwalt
8971084258 Fix power issues around wifi scans.
- Sending a broadcast indicating when scan requests could be serviced so that
apps don't request scans we won't do anything with.
- Fix our batt stats accounting so we only count it if we send the request to
the driver.

bug: 8868201
bug: 9496690
Change-Id: I64a4f1c294c848ac64c50d8854ed4a6a1a47f603
2013-06-26 10:00:16 -07:00
Vinit Deshapnde
8ed09e893f Fix an NPE in NsdManager
The NPE happens because NSD Manager doesn't always notify with a 'good'
notification for SERVICE_FOUND. It can get in a situation where a
SERVICE_FOUND is recevied from MDnsDs demon when processing StopDiscovery
on the messaging thread. When that happens, NsdService sends a message
to NsdManager with an invalid index of the listener.

The fix is twofold. First, we fix NsdService to not generate a message if
it doesn't have a good listener index. And second, we also fix NsdManager
to watch for invalid index.

Change-Id: I3d63af10bded13c72e8e437a1ebf74a666760432
2013-06-25 19:45:03 -07:00
Svetoslav
b10804a903 am 0cb0a37f: am a0b9e1ee: am 99e4a0f5: Merge "Improper initialization of the accessibility manager service." into jb-mr2-dev
* commit '0cb0a37f1c8463fa3ba535dc4969316f7c1cbf88':
  Improper initialization of the accessibility manager service.
2013-06-25 17:02:01 -07:00
Craig Mautner
4addfc5f39 Add API to convert translucent Activity to opaque.
Fixes bug 9298778.

Change-Id: If6198f42bdea8aa727a2abc672eb0062aaf63ca3
2013-06-25 16:56:37 -07:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
Christopher Tate
a5df9aa497 am 3c0cd0b5: am 34718238: am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '3c0cd0b54064f81a6a74d895707453fb0132719c':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-25 16:02:13 -07:00
Svetoslav
0cb0a37f1c am a0b9e1ee: am 99e4a0f5: Merge "Improper initialization of the accessibility manager service." into jb-mr2-dev
* commit 'a0b9e1eead9cbde980ca5ee8406100d9f3bb8d4d':
  Improper initialization of the accessibility manager service.
2013-06-25 15:01:16 -07:00
John Spurlock
bf991a8f42 Move battery stats call from SystemUI to system server.
The UPDATE_DEVICE_STATS permission is no longer required in sysui.

Change-Id: Icc3120b7873563e3727e56bed9f3b4767da0606d
2013-06-25 10:21:11 -04:00
Dianne Hackborn
d982851d29 Merge "Use FastPrintWriter... everywhere." 2013-06-25 01:18:57 +00:00
Dianne Hackborn
8c84109b9f Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result.  Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
2013-06-24 18:16:48 -07:00
Craig Mautner
a3f62a8439 Merge "When an app dies launch home conditionally." 2013-06-24 23:31:00 +00:00
Craig Mautner
37f748db85 When an app dies launch home conditionally.
The determination for whether to launch home after an app dies
did not include whether the app would have returned home on exit.
This fixes that by checking what the app would naturally return to.

Fixes bug 9466261.

Change-Id: Ife6e895b9ef8c11b0a7f470d3eac4e88e763930b
2013-06-24 16:19:55 -07:00
Christopher Tate
3c0cd0b540 am 34718238: am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '347182386c54fd4aa4478f35b712c230eb290468':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-24 16:08:15 -07:00
Christopher Tate
347182386c am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '3e7d0344399ac2f607fddde32c1a5e54228a38f9':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-24 16:05:49 -07:00
Dianne Hackborn
3af16b226b Merge "Improve FastPrintWriter." 2013-06-24 23:02:02 +00:00
Christopher Tate
3e7d034439 Merge "Avoid adding FORWARD_LOCK flag to an updated system app" 2013-06-24 23:02:00 +00:00
Dianne Hackborn
e5a9c92377 Improve FastPrintWriter.
Change-Id: I23acb8d4c3db1f2f8e2f8003296f8c253e2ae7d2
2013-06-24 15:54:52 -07:00
Craig Mautner
7a78b39428 Merge "Fix unnecessary and harmful task movement." 2013-06-24 18:38:11 +00:00