Coalescing multiple print job notifications (Settings)
We used to show a single notificaiton for every print job but this is against th UX guidelines. Since we have to lead by example, this change adds coalescing of multiple notifications. bug:11155212 Change-Id: I865450495e7e85bd6620c1f42aeef07d2f83a01a
This commit is contained in:
committed by
Svetoslav Ganov
parent
16ad57483d
commit
d9f156ddf0
@@ -19,6 +19,7 @@ package com.android.settings.print;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.print.PrintJob;
|
||||
@@ -45,6 +46,8 @@ public class PrintJobSettingsFragment extends SettingsPreferenceFragment {
|
||||
private static final int MENU_ITEM_ID_CANCEL = 1;
|
||||
private static final int MENU_ITEM_ID_RESTART = 2;
|
||||
|
||||
private static final String EXTRA_PRINT_JOB_ID = "EXTRA_PRINT_JOB_ID";
|
||||
|
||||
private static final String PRINT_JOB_PREFERENCE = "print_job_preference";
|
||||
private static final String PRINT_JOB_MESSAGE_PREFERENCE = "print_job_message_preference";
|
||||
|
||||
@@ -53,7 +56,7 @@ public class PrintJobSettingsFragment extends SettingsPreferenceFragment {
|
||||
private final PrintJobStateChangeListener mPrintJobStateChangeListener =
|
||||
new PrintJobStateChangeListener() {
|
||||
@Override
|
||||
public void onPrintJobsStateChanged(PrintJobId printJobId) {
|
||||
public void onPrintJobStateChanged(PrintJobId printJobId) {
|
||||
updateUi();
|
||||
}
|
||||
};
|
||||
@@ -141,8 +144,8 @@ public class PrintJobSettingsFragment extends SettingsPreferenceFragment {
|
||||
}
|
||||
|
||||
private void processArguments() {
|
||||
mPrintJobId = (PrintJobId) getArguments().getParcelable(
|
||||
PrintSettingsFragment.EXTRA_PRINT_JOB_ID);
|
||||
String printJobId = getArguments().getString(EXTRA_PRINT_JOB_ID);
|
||||
mPrintJobId = PrintJobId.unflattenFromString(printJobId);
|
||||
if (mPrintJobId == null) {
|
||||
finish();
|
||||
}
|
||||
|
Reference in New Issue
Block a user