Make notifications app list use new manage apps
The designs for Settings have the notification app list using the same UI as the Manage Apps list, so switch the notification app list over to the ManageApplications fragment. This involves adding some notification based filters and connecting the data from the Notification Backend to ApplicationsState. Bug: 19443900 Change-Id: I5e5cdb16890d536613ee59292b89a89b6fb9e2e6
This commit is contained in:
@@ -57,6 +57,7 @@ public class ApplicationsState {
|
||||
public void onPackageSizeChanged(String packageName);
|
||||
public void onAllSizesComputed();
|
||||
public void onLauncherInfoChanged();
|
||||
public void onLoadEntriesCompleted();
|
||||
}
|
||||
|
||||
public static interface AppFilter {
|
||||
@@ -125,6 +126,9 @@ public class ApplicationsState {
|
||||
|
||||
String normalizedLabel;
|
||||
|
||||
// A location where extra info can be placed to be used by custom filters.
|
||||
Object extraInfo;
|
||||
|
||||
AppEntry(Context context, ApplicationInfo info, long id) {
|
||||
apkFile = new File(info.sourceDir);
|
||||
this.id = id;
|
||||
@@ -444,6 +448,7 @@ public class ApplicationsState {
|
||||
static final int MSG_ALL_SIZES_COMPUTED = 5;
|
||||
static final int MSG_RUNNING_STATE_CHANGED = 6;
|
||||
static final int MSG_LAUNCHER_INFO_CHANGED = 7;
|
||||
static final int MSG_LOAD_ENTRIES_COMPLETE = 8;
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
@@ -487,6 +492,11 @@ public class ApplicationsState {
|
||||
mActiveSessions.get(i).mCallbacks.onLauncherInfoChanged();
|
||||
}
|
||||
} break;
|
||||
case MSG_LOAD_ENTRIES_COMPLETE: {
|
||||
for (int i=0; i<mActiveSessions.size(); i++) {
|
||||
mActiveSessions.get(i).mCallbacks.onLoadEntriesCompleted();
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -552,6 +562,10 @@ public class ApplicationsState {
|
||||
}
|
||||
}
|
||||
|
||||
Looper getBackgroundLooper() {
|
||||
return mThread.getLooper();
|
||||
}
|
||||
|
||||
public class Session {
|
||||
final Callbacks mCallbacks;
|
||||
boolean mResumed;
|
||||
@@ -1131,6 +1145,9 @@ public class ApplicationsState {
|
||||
if (numDone >= 6) {
|
||||
sendEmptyMessage(MSG_LOAD_ENTRIES);
|
||||
} else {
|
||||
if (!mMainHandler.hasMessages(MainHandler.MSG_LOAD_ENTRIES_COMPLETE)) {
|
||||
mMainHandler.sendEmptyMessage(MainHandler.MSG_LOAD_ENTRIES_COMPLETE);
|
||||
}
|
||||
sendEmptyMessage(MSG_LOAD_LAUNCHER);
|
||||
}
|
||||
} break;
|
||||
|
Reference in New Issue
Block a user