6208 Commits

Author SHA1 Message Date
Kenny Root
5a7c91769f Merge "Fix free_cache to actually work" into ics-mr1 2011-12-01 14:14:22 -08:00
Dianne Hackborn
55e81bd0f2 Merge "Improve how we manage the previous app." into ics-mr1 2011-12-01 12:47:43 -08:00
Dianne Hackborn
50685606cf Improve how we manage the previous app.
Setting it when a new activity is being resumed is too soon, because
things like an activity launching an exiting (without being seen by
the user) can knock out the real previous app that we want.

So now we set it when an activity is stopped.  At this point it is
going to move from the preceptible to background oom adj, so it is
a good point to determine whether it should be a previous app to
instead put it to that oom adj.  This also avoids things like
activities that start and immediately finish from impacting the
previous app.

Further, we keep track of the time each activity was last shown, and
use this to further filter what is set as the previous app.

Change-Id: I72d1cac4de0cc2d4598170296028f11b06918d4f
2011-12-01 12:23:37 -08:00
Kenny Root
ad757e9b36 Fix free_cache to actually work
This broke with some other path-related changes, so it was scanning for
/data/*/cache instead of /data/data/*/cache

Also remove redundant call to restat

Bug: 5686310
Change-Id: Id1661f0f1337858fc9ead53c56ab7557f421c591
2011-12-01 09:07:55 -08:00
Daniel Sandler
2a40d0d92b Merge "Put screensavers back in the icebox for now. DO NOT MERGE." into ics-mr1 2011-12-01 06:29:53 -08:00
satok
b94a7fb3d7 Merge "Fix ConcurrentModificationException in TextServicesManagerService" into ics-mr1 2011-11-30 17:37:52 -08:00
Svetoslav Ganov
d8ec8db5e0 Merge "Fixing memory leaks in the accessiiblity layer." into ics-mr1 2011-11-30 16:56:41 -08:00
Dianne Hackborn
88f10c6ce5 Merge "Fix issue #5679504: Device stuck and sudden reboot - Watchdog reset?" into ics-mr1 2011-11-30 14:12:44 -08:00
Dianne Hackborn
f8d20bd649 Merge "Turn off debug log." into ics-mr1 2011-11-30 14:11:17 -08:00
Daniel Sandler
d2b22a885a Put screensavers back in the icebox for now. DO NOT MERGE.
Bug: 5689684
Change-Id: I3a5291c3520bb43e35d55714f1522e4ae7f6e63c
2011-11-30 15:47:36 -05:00
Daniel Sandler
865b98024f Merge "Expanding NotificationManager's event logging." into ics-mr1 2011-11-30 11:54:17 -08:00
Dianne Hackborn
bbb09aceb6 Turn off debug log.
Change-Id: I1d4612133580d493d81d0b15752e009202e95ce0
2011-11-30 11:40:40 -08:00
Dianne Hackborn
1fbee79eb3 Fix issue #5679504: Device stuck and sudden reboot - Watchdog reset?
Calls to get the display size no longer need to acquire the global
window lock.

Change-Id: I751ea6ed0e20f1f521783f4bd5a8f9c31cd43573
2011-11-30 11:29:58 -08:00
satok
4c3fa642ef Fix ConcurrentModificationException in TextServicesManagerService
Bug: 5687402
Change-Id: I59086f956b6ee618ff0e1b1034d767d9ae295848
2011-11-30 22:46:16 +09:00
Daniel Sandler
b64cb88c32 Expanding NotificationManager's event logging.
Specifically, add the "tag" and "mustNotHaveFlags" columns.

(Hunting bug 5444859.)

Change-Id: Ic9ece44ed4697f7a8ef54e7870f72c9f94518cd9
2011-11-29 23:48:29 -05:00
Svetoslav Ganov
d116d7c78a Fixing memory leaks in the accessiiblity layer.
1. AccessibilityInteractionConnections were removed from the
   AccessiiblityManagerService but their DeathRecipents were
   not unregistered, thus every removed interaction connection
   was essentially leaking. Such connection is registered in
   the system for every ViewRootImpl when accessiiblity is
   enabled and inregistered when disabled.

2. Every AccessibilityEvent and AccessiilbityEventInfo obtained
   from a widnow content querying accessibility service had a
   handle to a binder proxy over which to make queries. Hoewever,
   holding a proxy to a remote binder prevents the latter from
   being garbage collected. Therefore, now the events and infos
   have a connection id insteand and the hindden singleton
   AccessiiblityInteaction client via which queries are made
   has a registry with the connections. This class looks up
   the connection given its id before making an IPC. Now the
   connection is stored in one place and when an accessibility
   service is disconnected the system sets the connection to
   null so the binder object in the system process can be GCed.
   Note that before this change a bad implemented accessibility
   service could cache events or infos causing a leak in the
   system process. This should never happen.

3. SparseArray was not clearing the reference to the last moved
   element while garbage collecting thus causing a leak.

bug:5664337

Change-Id: Id397f614b026d43bd7b57bb7f8186bca5cdfcff9
2011-11-29 18:51:30 -08:00
Dianne Hackborn
ebac48c6ad Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data
Need to make sure the "files" directory is created.

Change-Id: I8d5b374a5a03590a5ce7fafb5171705414f7b2f9
2011-11-29 18:01:50 -08:00
Dianne Hackborn
1808f214b0 Merge "Fix issue #5636525: ANR observed in setup wizard after changing language" into ics-mr1 2011-11-29 15:28:41 -08:00
Dianne Hackborn
8bf0aa9b2b Fix issue #5636525: ANR observed in setup wizard after changing language
We could sometimes allow a process to be killed while still waiting for
an activity in it to finish stopping.

Change-Id: Ibf89665c4ad6da6be22de04a82b19ef778a7fda0
2011-11-29 13:54:43 -08:00
Dianne Hackborn
50b2042502 Merge "Another attempt at getting OOM reports to batch." into ics-mr1 2011-11-29 13:05:26 -08:00
Dianne Hackborn
672342c309 Another attempt at getting OOM reports to batch.
We now generate a stack-trace looking thing at the top of the report.

Also fix a bug I hit where the phone window manager was sending a
broadcast before the boot had completed.

Change-Id: I0cee16180e4d05c9bd3fe715212a28f504ec91ac
2011-11-29 12:55:50 -08:00
Dianne Hackborn
81de8b99f5 Fix issue #5642121: Proximity sensor didn't turn the screen on in call
Turning animations back on exposed this.  The problem is that when the
screen brightness changes, it initiates a brightness animation.  When
we force the screen to black as we wait for it to be ready to display,
it sees that an animation is running so stops it and thinks this means
it should now turn the display off.

To fix this, don't modify the screen brightness while we are waiting
to show the screen.  This is good anyway because the whole point is to
avoid showing the screen until ready, and modifying the brightness at
that point would turn it on prematurely.

Change-Id: I84b296f8ca5705c2d237ea7741cdeb95c5521df9
2011-11-28 16:57:37 -08:00
Dianne Hackborn
6d05fd3c79 Fix issue #5588689: Black camera preview after coming back from gmail
Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window.  This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
2011-11-28 14:45:50 -08:00
Robert Greenwalt
eaeb4f4e3c Merge "Fix some policy-base routing issues." into ics-mr1 2011-11-23 11:25:39 -08:00
Robert Greenwalt
e83d181606 Fix some policy-base routing issues.
Secondary nets sometimes come up with no routes, but parsing errors end up with null
routes getting added.  Trim that away.  Also added some dumpstate logging of the secondary
route tables and rules.

bug:5615697
Change-Id: I94c9d888bab958df44891b9117236436e046cc7f
2011-11-23 09:36:16 -08:00
satok
1a3c051bcc Merge "Hide/show ime switch icon properly" into ics-mr1 2011-11-17 18:02:09 -08:00
satok
3afd6c0d4d Hide/show ime switch icon properly
Bug: 5481999
Change-Id: I4b3dde7285a9ac49da8d5d1133fddd0807b03f4d
2011-11-18 09:15:18 +09:00
Jeff Sharkey
8ac35e30b2 Merge "Only write network stats when already loaded." into ics-mr1 2011-11-17 12:10:02 -08:00
Jeff Sharkey
c506ff6150 Only write network stats when already loaded.
Bug: 5584564
Change-Id: Ife2a68804bf3691e9bccdc167807204bce8a85b2
2011-11-17 12:05:46 -08:00
Jeff Sharkey
b9df01d396 Merge "Update NTP outside locks, log large trim events." into ics-mr1 2011-11-16 22:59:13 -08:00
Daniel Sandler
d5decdccc6 Merge "Disable desk dock apps." into ics-mr1 2011-11-16 22:33:44 -08:00
Jeff Sharkey
684c54a2eb Update NTP outside locks, log large trim events.
Move NTP updates outside locks to avoid blocking ShutdownThread.  Add
logging around trim events that remove substantial history.  Include
history start in sample events.

Bug: 5627247, 5584564
Change-Id: If9bbd93842c710efcdec94e68da87e9e42a5f961
2011-11-16 17:58:47 -08:00
satok
e5febfd5bd Merge "Clean up the spell checker framework" into ics-mr1 2011-11-16 17:35:54 -08:00
satok
060677f468 Clean up the spell checker framework
Change-Id: I64c0d813e53a4ebf8d7e63463e36f6900f1aa7d3
2011-11-17 09:40:56 +09:00
Dianne Hackborn
ee9aef0b42 Maybe fix issue #5627399: java.lang.RuntimeException - While sign in...
...through setup wizard after wipe data

Deal with finish() being called when there are no running activities
on the stack.

Also some improved debugging output.

Change-Id: Ia1d3f3f7e7b79c06ca95c738081322fc80282e0d
2011-11-16 13:21:46 -08:00
Daniel Sandler
11ddf533a2 Disable desk dock apps.
When a device is attached to a desk dock, the
CATEGORY_DESK_DOCK intent will no longer be fired.
As a side effect, the "dock home" behavior (which captures
the home key for the dock app as long as the device is
docked) is now disabled for desk docks.

Car docks are unchanged.

Bug: 5591015
Change-Id: I7884f655913c31cf53b88cb2e2b371987be27f64
2011-11-16 11:10:03 -08:00
Dianne Hackborn
7aa6d31240 Whoops, need to acquire lock.
Also increase time between reports to try to reduce the amount
of redundant spam we get.

Change-Id: Iedd7d743826fffa62ee431073cb7dfb49a00cea0
2011-11-15 16:12:30 -08:00
Dianne Hackborn
d8c98fee02 Improve low memory dropbox reporting.
The msg is now constructed to try to bin these reports in
interesting ways.  We'll see.  Also change the tag name from
watchdog to lowmem, since sharkey is kindly taking care of
the back-end to handle this.

Improve how we put processes into low memory states to better
poke things like home and the previous app.

Also clean up some debug output, and add a few new am comment
options for controlling the current debug app.

Change-Id: I562a931a95244a2727bb7a6e1fd80dec259cdae2
2011-11-15 14:15:58 -08:00
Michael Jurka
4b7494e07a Merge "Updating recent apps visuals on tablet" into ics-mr1 2011-11-14 23:53:34 -08:00
Michael Jurka
bfd24acd31 Updating recent apps visuals on tablet
- getting rid of blue glow (5529032)
- moving app icon position
- show message if there are no recent apps (5533332)
- fixing rare IllegalStateException on orientation change (5584344)

Change-Id: I2210e584957869c8f02339e6841daf39364a9dad
2011-11-14 23:49:10 -08:00
Jeff Sharkey
d968670d83 Merge "Conservatively trim data usage stats." into ics-mr1 2011-11-14 23:37:17 -08:00
Jeff Sharkey
7ee8658453 Conservatively trim data usage stats.
Instead of trusting NTP time alone, use the most-conservative of
system clock and NTP.

Bug: 5584564
Change-Id: I5dd87fc009959b1cf0a7d660e385a0b1a8be238b
2011-11-14 20:11:38 -08:00
Dianne Hackborn
91c2b5cebe Merge "Improve low memory reporting." into ics-mr1 2011-11-14 18:36:50 -08:00
Dianne Hackborn
8ec8d41aa6 Improve low memory reporting.
Change-Id: I42d56ab8026fd02232dd11dbfbc513fbc0a1a851
2011-11-14 18:27:24 -08:00
Dianne Hackborn
813075a678 Maybe fix issue #5405788: Device continuously opening and closing...
...the "Complete action using" dialog

I have never been able to reproduce this consistently, but here is
another stab in the twilight.  It looks like during boot we have
a potential race where we could reset the config sequence number after
we had gone through a config change, causing ActivityThread to ignore
a following config change.  Maybe this change will help.

Change-Id: I4b731df5fd5c63894ca2e9bd34693b31ab1c0565
2011-11-14 17:45:19 -08:00
Dianne Hackborn
be70785f9b Make activity manager more robust in the face of app activity leaks.
This came up from bug #5601885: Memory increase (leak?) in system_server
Stingray MR1

This isn't *really* a leak in the system process -- it is a leak in an
application process that is causing the system process to keep around
a bunch of ActivityRecord objects longer than it should, until that app
process is ultimately killed.

Unfortunately these days leaking an ActivityRecord also often means
leaking a thumbnail, which is a big slab of memory.

So make the activity manager better about this, using a weak reference
from the handle the object has so we can still clean away most of the
state associated with the ActivityRecord even if the client side leaks
its own reference.

Change-Id: Idbab45e09749cdfb54899203da7981e7b3576e25
2011-11-11 15:05:59 -08:00
Robert Greenwalt
24597eb77e Merge "Tone down Tethering logs." into ics-mr1 2011-11-11 14:37:18 -08:00
Robert Greenwalt
fd1be2bc1e Tone down Tethering logs.
bug:5601582
Change-Id: I66c0a5a06a2c13a7cf93ea264d156b37df23745f
2011-11-11 14:09:45 -08:00
Robert Greenwalt
424781e2e1 Fix NPE in ConnectivityService.
If it's configured with a defined network but can't create a network state tracker
for it, it would NPE and restart the framework whenever a default network
disconnects.

bug:5603268
Change-Id: I816c4f522d766e0353a713623f6635b03395b01e
2011-11-11 09:56:03 -08:00
Jeff Sharkey
51c00a57f4 Merge "Clamp non-monotonic stats instead of dropping." into ics-mr1 2011-11-10 20:31:03 -08:00