14704 Commits

Author SHA1 Message Date
Robert Greenwalt
692af53a20 am eccc0905: am 540784f9: Merge "Cleanup the shutdown of BatchedScans." into klp-dev
* commit 'eccc0905bd150a334a98efedfb08570bcdd1c31a':
  Cleanup the shutdown of BatchedScans.
2013-09-20 11:22:35 -07:00
Christopher Tate
cc5db25485 am 2e6eef65: am 3301f76b: Merge "Don\'t back up apps in the \'stopped\' state" into klp-dev
* commit '2e6eef655f079536251ff030d38fb6480dd97a18':
  Don't back up apps in the 'stopped' state
2013-09-20 11:21:18 -07:00
Craig Mautner
d052ee34a5 am f15024c8: am 12946530: Merge "Only show launcher for the bottom activity in a task" into klp-dev
* commit 'f15024c8c8b3d21919347070909049c61c14ae06':
  Only show launcher for the bottom activity in a task
2013-09-20 11:21:00 -07:00
Ed Heyl
083ebcf49a am 3ece8270: am 812c4d73: Merge "fix typo" into klp-dev
* commit '3ece8270173df27518c16a5904ae5fe3c6b51913':
  fix typo
2013-09-20 11:20:33 -07:00
Amith Yamasani
fa80ffa4fd am 638918a2: am 722b15e0: Merge "Fix a regression in pausing activity immediately on sleep" into klp-dev
* commit '638918a2681cff345b9e3bd5ff7b170a874125dc':
  Fix a regression in pausing activity immediately on sleep
2013-09-20 11:20:03 -07:00
Robert Greenwalt
eccc0905bd am 540784f9: Merge "Cleanup the shutdown of BatchedScans." into klp-dev
* commit '540784f903c8a9e808ef88d14fe5e1227bda4561':
  Cleanup the shutdown of BatchedScans.
2013-09-20 10:50:39 -07:00
Robert Greenwalt
540784f903 Merge "Cleanup the shutdown of BatchedScans." into klp-dev 2013-09-20 17:43:30 +00:00
Dianne Hackborn
9bef5b67dc resolved conflicts for merge of 20021b30 to master
Change-Id: Ie758de25a277ed0a25bf08e4cd2c57c9519bd52d
2013-09-20 10:40:34 -07:00
Craig Mautner
de4232f721 am 9ea8bf15: am 7908f190: Merge "Debug for b/10689184." into klp-dev
* commit '9ea8bf154cdad4b4cb627d9d6c9a9bc01c31abcd':
  Debug for b/10689184.
2013-09-20 09:58:41 -07:00
Craig Mautner
2c34bd6a9a am cd569b31: am e8a94224: Merge "Return tasks in correct order." into klp-dev
* commit 'cd569b31d398fe846eeee567d2816a3bb93dd493':
  Return tasks in correct order.
2013-09-20 09:58:22 -07:00
Christopher Tate
0719715586 am 654aad21: am 9c5cc571: Merge "Support for "not the home app you\'re looking for" metadata" into klp-dev
* commit '654aad21609642f7d0891962d72c0dfd4077fb94':
  Support for "not the home app you're looking for" metadata
2013-09-20 09:58:18 -07:00
Amith Yamasani
25fd841bd5 am 80af4f7b: am 7301bd96: Merge "Use a separate thread for services that do NTP lookup" into klp-dev
* commit '80af4f7b098aa912dcc7c2ccaf4a559e15e608ff':
  Use a separate thread for services that do NTP lookup
2013-09-20 09:58:08 -07:00
Robert Greenwalt
82f4218c0d Cleanup the shutdown of BatchedScans.
Fixes binder-death as well as disambiguation when an app has multiple requests in.

bug:10641931
Change-Id: Ib701d531fa51e7e2a027848cfdfcad3b47056923
2013-09-20 16:32:47 +00:00
Christopher Tate
2e6eef655f am 3301f76b: Merge "Don\'t back up apps in the \'stopped\' state" into klp-dev
* commit '3301f76b2317d2ee2d72e2cdd396e29be63fd414':
  Don't back up apps in the 'stopped' state
2013-09-19 19:21:11 -07:00
Christopher Tate
3301f76b23 Merge "Don't back up apps in the 'stopped' state" into klp-dev 2013-09-20 02:16:10 +00:00
Craig Mautner
f15024c8c8 am 12946530: Merge "Only show launcher for the bottom activity in a task" into klp-dev
* commit '12946530cfba2024fa45c06b0060fe5c91252aab':
  Only show launcher for the bottom activity in a task
2013-09-19 17:53:38 -07:00
Craig Mautner
12946530cf Merge "Only show launcher for the bottom activity in a task" into klp-dev 2013-09-20 00:51:20 +00:00
Craig Mautner
f51b5588d7 Only show launcher for the bottom activity in a task
When transitioning from activity-over-launcher to task-over-launcher
ensureActivitiesVisibleLocked() was too aggressive in showing the
launcher. If there were any non-fullscreen activities in a task that
sits over the launcher then the launcher would be shown.

This fix adds a test to make sure the launcher will only be shown if
the bottommost activity in such a task is non-fullscreen.

Fixes bug 10840919.

Change-Id: I5dcd63be3fa2865ae38cbb921332937dfa4b5d47
2013-09-19 17:19:51 -07:00
Christopher Tate
9ac23d0952 Don't back up apps in the 'stopped' state
E.g. right after install from the Play Store, or after a force stop.

Bug 10845317

Change-Id: I7764ce61caa77136ca2758657f111928f9740fc0
2013-09-19 17:12:27 -07:00
Ed Heyl
3ece827017 am 812c4d73: Merge "fix typo" into klp-dev
* commit '812c4d737896fbf5dffa272f5d15863fb185d956':
  fix typo
2013-09-19 16:46:18 -07:00
Ed Heyl
812c4d7378 Merge "fix typo" into klp-dev 2013-09-19 23:43:25 +00:00
Ed Heyl
6e65cb47dc fix typo
Change-Id: I97df15ea7d349e0224e1830d7327dde87e840a51
2013-09-19 16:25:57 -07:00
Amith Yamasani
638918a268 am 722b15e0: Merge "Fix a regression in pausing activity immediately on sleep" into klp-dev
* commit '722b15e00065bebfd711a34123a64b1c4a65d8f7':
  Fix a regression in pausing activity immediately on sleep
2013-09-19 15:46:19 -07:00
Amith Yamasani
722b15e000 Merge "Fix a regression in pausing activity immediately on sleep" into klp-dev 2013-09-19 22:42:50 +00:00
Dianne Hackborn
20021b300f am 70817c47: Merge "Implement issue #10691475: Kill cached processes if about to..." into klp-dev
* commit '70817c479aa05778733d9afc809c311e8030b000':
  Implement issue #10691475: Kill cached processes if about to...
2013-09-19 14:49:35 -07:00
Dianne Hackborn
70817c479a Merge "Implement issue #10691475: Kill cached processes if about to..." into klp-dev 2013-09-19 21:44:20 +00:00
Dianne Hackborn
3bc8f78d7a Implement issue #10691475: Kill cached processes if about to...
...be uncached and too large

When the device is in a low RAM state, when we go to pull a cached
process out to use for some background operation, we can now kill
the current process if we consider its size to be too large.

Note that the current implementation for killing processes is to
just use the same killUnneededProcessLocked() method that we already
have for other things like too many cached processes.  This is a
little wrong here, though, because in this case we are at the
point where the caller is actually looking for a process to use.
This current code is not actually removing or cleaning up the
process, so we still need to return the now killed ProcessRecord
and let things fall out from there, which typically means the caller
trying to make an IPC on it and failing and falling into its "oh
no the process died unexpectedly" path.  All code using this
*should* be able to handle this correctly, anyway, since processes
really can be killed at any time.

At some point we may to make this implementation cleaner, where it
actually tears down the process right in the call and returns a
null ProcessRecord.  That is very dangerous however (we'd need to
go through all paths into this to make sure they are going to be
okay with process state changing on them like that), and I'm not
sure it is really worthwhile.  This intention is that killing
processes like this is unusual, due to processes being too large,
and anyway as I wrote all of our incoming code paths must already
be able to handle the process being killed at this point and one
could argue this is just another way to excercise those code paths.
Really, the main negative to this is that we will often have spam
in the log with exceptions about processes dying unexpectedly.
If that is the only issue, we could just add some conditions to
quiet that up at in this case.

We don't want to compute the size of the process each time we try
to evaluate it here (it takes 10s or ms to do so), so there is now
a new field associated with the process to give us the last pss
size we computed for it while it was in the cached state.

To be able to have better cached pss data when we now need it, the
timing for computing process pss has been tuned to use a much
shorter delay for the situations when the process has first switch
into a new state.  This may result in us having a fair amount more
pss data overall, which is good, as long as it doesn't cause us to
be computing pss excessively and burning cpu.

Procstats now also has new state to keep track of the number of
times each process has been killed by this new system, along with
the min, avg, max pss of all the times it has happened.  This has
slightly changed the checkin format to include this additional data
at the end of pkgkills/prockills lines.

Other changes here:

- Fixed a problem where GPU RAM was not being seen when dumping
  the full RAM details of a process.  This was because in that
  case the system would ask the process to compute its own MemInfo,
  which it returned, but the process doesn't have permission to
  access the files containing the GPU RAM data.  So now the system
  always computes the MemInfo and hands it to the app.

- Improved broadcast delays to not apply the delay if the next receiver
  of the broadcast is going to run in the same process as the last
  one.  A situation I was seeing was an application that had two
  receivers, one of which started a service; we are better off letting
  the second receiver run while the service is running.

- Changed the alarm manager's TIME_TICK broadcast to be a foreground
  broadcast.  This really should have been anyway (it is supposed to
  go out even minute, on the minute, very accurately, for UI elements
  to update), and is even more important now that we are doing more
  things to delay background broadcasts.

- Reworked how we maintain the LRU process list.  It is now divided
  into the two parts, the top always containing the processes holding
  activities.  This better matches the semantics we want (always try
  to keep those around modulated by the LRU order we interleave with
  other cached processes), and we now know whether a process is being
  moved on the LRU list because of an activity operation so we can
  only change the order of these activity processes when user operations
  happen.  Further, this just makes that common code path a lot simpler
  and gets rid of all the old complexity that doesn't make sense any
  more.

Change-Id: I04933ec3931b96db70b2b6ac109c071698e124eb
2013-09-19 14:35:53 -07:00
Amith Yamasani
ce15e157a6 Fix a regression in pausing activity immediately on sleep
At some point during refactoring of ActivityStack, the code to pause the current
activity got deleted. Added back that line of code. Activity will now pause
as soon as the screen is turned off, rather than after 5 seconds (sleep timeout).

Bug: 10632898

Change-Id: If3cc8708d692d29a13dbd8cfd9edda8883b38c2e
2013-09-19 14:30:47 -07:00
Craig Mautner
9ea8bf154c am 7908f190: Merge "Debug for b/10689184." into klp-dev
* commit '7908f19015632bd593965b7a3ac9c685ab23d85f':
  Debug for b/10689184.
2013-09-19 14:10:41 -07:00
Craig Mautner
7908f19015 Merge "Debug for b/10689184." into klp-dev 2013-09-19 21:08:27 +00:00
Craig Mautner
cd569b31d3 am e8a94224: Merge "Return tasks in correct order." into klp-dev
* commit 'e8a9422495d6af9fc68cf4e838a4a5f19177034b':
  Return tasks in correct order.
2013-09-19 13:05:43 -07:00
Craig Mautner
e8a9422495 Merge "Return tasks in correct order." into klp-dev 2013-09-19 20:03:24 +00:00
Craig Mautner
b3370cec71 Debug for b/10689184.
Change-Id: I67b7a4bd7fb902b0d0275af0665625593dc1af00
2013-09-19 12:55:19 -07:00
Christopher Tate
654aad2160 am 9c5cc571: Merge "Support for "not the home app you\'re looking for" metadata" into klp-dev
* commit '9c5cc571e5abf97a816fea2b04cd1e711e83564c':
  Support for "not the home app you're looking for" metadata
2013-09-19 12:48:19 -07:00
Christopher Tate
9c5cc571e5 Merge "Support for "not the home app you're looking for" metadata" into klp-dev 2013-09-19 19:46:20 +00:00
Christopher Tate
bd413f6c05 Support for "not the home app you're looking for" metadata
* Make sure that pm.getHomeActivities() returns the activity metadata
  as well, so that the caller can trace the reference

* Add a public canonical name for that metadata key

Bug 10749961

Change-Id: Ic4d0750d61001ffe5af180398f042afa30eea1ce
2013-09-19 12:31:49 -07:00
Amith Yamasani
80af4f7b09 am 7301bd96: Merge "Use a separate thread for services that do NTP lookup" into klp-dev
* commit '7301bd96c43f1a3604e88612c1a4214d57f88000':
  Use a separate thread for services that do NTP lookup
2013-09-19 12:21:12 -07:00
Amith Yamasani
7301bd96c4 Merge "Use a separate thread for services that do NTP lookup" into klp-dev 2013-09-19 19:17:51 +00:00
Craig Mautner
c0fd805234 Return tasks in correct order.
Fixed ActivityManager.getRunningTasks().

Fixes bug 10705790.

Change-Id: Ia3f66e592e08a87896a1ab59f980618ec5310dfe
2013-09-19 11:20:17 -07:00
Amith Yamasani
450a16b33f Use a separate thread for services that do NTP lookup
Some services do periodic network time lookups and can wedge the other operations on
BackgroundThread and IO Thread, causing Watchdog to kill the runtime. So best to put
those handlers on separate threads.

Going forward, should convert NTP lookups to be async with callbacks.

Bug: 10646480
Change-Id: I8c7ba6052cb3539575712c2099a706b14ff60196
2013-09-19 10:57:16 -07:00
Craig Mautner
0bb53db2fa am acc7f154: am 81d1689c: Merge "Remove debug logging for b/106899184." into klp-dev
* commit 'acc7f154a780489a1b3dcc9e1677c0389c088b5d':
  Remove debug logging for b/106899184.
2013-09-19 07:56:58 -07:00
Craig Mautner
acc7f154a7 am 81d1689c: Merge "Remove debug logging for b/106899184." into klp-dev
* commit '81d1689ceb3252d2cfa3397cd6a5b3337a3a6a75':
  Remove debug logging for b/106899184.
2013-09-19 07:53:03 -07:00
Craig Mautner
81d1689ceb Merge "Remove debug logging for b/106899184." into klp-dev 2013-09-19 14:50:41 +00:00
Jim Miller
8b7ea57f8e am cd87d0ab: am f4292478: Merge "Fix keyguard/Keystore storage issue" into klp-dev
* commit 'cd87d0ab9623d5028d767e8167923c57aa2bac0d':
  Fix keyguard/Keystore storage issue
2013-09-18 17:06:21 -07:00
Craig Mautner
ec9cf65b55 Remove debug logging for b/106899184.
Change-Id: I1e5f959a6d674b4bf9609553f28e66ffee367f5c
2013-09-18 17:04:45 -07:00
Jim Miller
cd87d0ab96 am f4292478: Merge "Fix keyguard/Keystore storage issue" into klp-dev
* commit 'f429247867ac524cf63bc01499ac47a90ebcaca9':
  Fix keyguard/Keystore storage issue
2013-09-18 17:02:48 -07:00
Jim Miller
f429247867 Merge "Fix keyguard/Keystore storage issue" into klp-dev 2013-09-19 00:00:22 +00:00
Jason Monk
41d6e07bf2 am 275d1adf: am ff65c6da: Merge "Fix PacManager to not unbind when no connection" into klp-dev
* commit '275d1adf0a8d7817f9a28c92822f5adb405528ff':
  Fix PacManager to not unbind when no connection
2013-09-18 16:55:28 -07:00
Jason Monk
275d1adf0a am ff65c6da: Merge "Fix PacManager to not unbind when no connection" into klp-dev
* commit 'ff65c6daab5268c28b3663cd02c1b3dfa6f1c90a':
  Fix PacManager to not unbind when no connection
2013-09-18 16:53:06 -07:00
Jason Monk
ff65c6daab Merge "Fix PacManager to not unbind when no connection" into klp-dev 2013-09-18 23:51:07 +00:00