Do not count print jobs if printing is not available. am: 24264eb250

am: e1f50ab779

* commit 'e1f50ab779ee0bdc82616532940cc7c1746030fa':
  Do not count print jobs if printing is not available.
This commit is contained in:
Philip P. Moltmann
2016-02-25 22:37:40 +00:00
committed by android-build-merger

View File

@@ -605,11 +605,13 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
@Override
public void setListening(boolean isListening) {
if (isListening) {
mPrintManager.addPrintJobStateChangeListener(this);
onPrintJobStateChanged(null);
} else {
mPrintManager.removePrintJobStateChangeListener(this);
if (mPrintManager != null) {
if (isListening) {
mPrintManager.addPrintJobStateChangeListener(this);
onPrintJobStateChanged(null);
} else {
mPrintManager.removePrintJobStateChangeListener(this);
}
}
}