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
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
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
We could sometimes allow a process to be killed while still waiting for
an activity in it to finish stopping.
Change-Id: Ibf89665c4ad6da6be22de04a82b19ef778a7fda0
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
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
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
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
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
...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
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
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
- 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
Instead of trusting NTP time alone, use the most-conservative of
system clock and NTP.
Bug: 5584564
Change-Id: I5dd87fc009959b1cf0a7d660e385a0b1a8be238b
...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
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
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