Switch second phase of notification sorting to lexicographic
string comparison in order to enforce a consistent comparison.
Note that this slightly changes the logic: Within groups we
previously fell back on authoritative rank comparison when
one of the notificiations didn't have a sort key. Now we
just replace missing sort keys with " ".
Bug: 16626175
Change-Id: I91f4f4afeeb2c8edda6cd2668011a7367795086c
Return empty List instead of null so calling functions don't throw NPE
when dereferencing return value.
Bug:17282683
Bug:17262485
Change-Id: Ica4952b11a8af28787a4a0b6a991ab888386aa7b
Some events in the future may not have originated
from a class, so we shouldn't be using ComponentName.
Bug:17259858
Change-Id: Id7fe3245b91596cf27ae4ec51655602f01665622
Getting the indexOf is useful for doing compound operations
like:
int i = set.indexOf(key);
if (i >= 0) {
Object o = set.valueAt(i);
o.blah();
set.removeAt(i);
}
Change-Id: I3d4b77d1461ba969fc6b4d332d52d4d084b5b53c
In application processes, monitor for when we start getting close
to the Dalvik heap limit, and ask the activity manager to try to
prune old activity instances in that case.
Add an explicit API for apps to ask that they have their own
activity instances cleaned up, if they want.
Fix some bugs in launching activities that were not correctly
applying the "multi task" behavior in the appropriate situations
of document-centric recents.
Clean up the activity manager's process removal code to all share
a common path.
Add a new "Spam" option to ActivityTests, which continually creates
new tasks, checking that the activity manager will now prune old
tasks rather than letting the app run out of RAM.
And while I was was doing this, I found problems with the path
for bringing an empty task to the foreground -- it could make
a new task instead of re-starting the root activity in the
existing task. This is fixed, and some code in the recents
UI for working around the bug is removed.
And as long as I am doing that, we now have nice hooks in to
the activity manager for AppTask to give some APIs for better
managing the task, so add those along with more tests for these
APIs in ActivityTests.
We should look at also having the activity manager try to prune
old tasks when it sees app processes being killed, to better balance
memory use across multiple processes when some processes may host
many documents. That however is for another CL...
Change-Id: I2bb81c3f92819350c868c7a7470b35817eb9bea9