Add summary text to Apps & notifications -> Notifications
Share the summary provider for Apps & notifications -> Notifications -> Notifications with Apps & notifications -> Notifications so that the upper level also shows the corresponding notification summary. Change-Id: Id6879d9a6b00237781320c18591703b3031c9627 Fix: 36376411 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -17,7 +17,6 @@ package com.android.settings.applications;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.SummaryLoader;
|
||||
@@ -29,23 +28,24 @@ import com.android.settings.notification.NotificationBackend;
|
||||
*/
|
||||
public class NotificationApps extends ManageApplications {
|
||||
|
||||
private static class SummaryProvider implements SummaryLoader.SummaryProvider {
|
||||
public static class SummaryProvider implements SummaryLoader.SummaryProvider {
|
||||
|
||||
private final Context mContext;
|
||||
private final SummaryLoader mLoader;
|
||||
private final NotificationBackend mNotificationBackend;
|
||||
private final PackageManagerWrapper mPackageManager;
|
||||
|
||||
private SummaryProvider(Context context, SummaryLoader loader) {
|
||||
public SummaryProvider(Context context, SummaryLoader loader) {
|
||||
mContext = context;
|
||||
mLoader = loader;
|
||||
mNotificationBackend = new NotificationBackend();
|
||||
mPackageManager = new PackageManagerWrapperImpl(mContext.getPackageManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setListening(boolean listening) {
|
||||
if (listening) {
|
||||
new AppCounter(mContext,
|
||||
new PackageManagerWrapperImpl(mContext.getPackageManager())) {
|
||||
new AppCounter(mContext, mPackageManager) {
|
||||
@Override
|
||||
protected void onCountComplete(int num) {
|
||||
updateSummary(num);
|
||||
|
Reference in New Issue
Block a user