Add app details menu item to uninstall an app for all users.

Also some fixes: uninstalled apps are now marked as such in the
all apps lists, and sorted to the bottom like disabled apps.  We
don't immediately close the installed app details screen when
launching the uninstall UI.

Change-Id: Id22b749c20fc2441733c604d1de8889269217c5c
This commit is contained in:
Dianne Hackborn
2012-09-16 18:27:14 -07:00
parent d41fd604cb
commit 3db54cb976
4 changed files with 104 additions and 37 deletions

View File

@@ -163,8 +163,12 @@ public class ApplicationsState {
private final Collator sCollator = Collator.getInstance();
@Override
public int compare(AppEntry object1, AppEntry object2) {
if (object1.info.enabled != object2.info.enabled) {
return object1.info.enabled ? -1 : 1;
final boolean normal1 = object1.info.enabled
&& (object1.info.flags&ApplicationInfo.FLAG_INSTALLED) != 0;
final boolean normal2 = object2.info.enabled
&& (object2.info.flags&ApplicationInfo.FLAG_INSTALLED) != 0;
if (normal1 != normal2) {
return normal1 ? -1 : 1;
}
return sCollator.compare(object1.label, object2.label);
}