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 @Override
public void setListening(boolean isListening) { public void setListening(boolean isListening) {
if (isListening) { if (mPrintManager != null) {
mPrintManager.addPrintJobStateChangeListener(this); if (isListening) {
onPrintJobStateChanged(null); mPrintManager.addPrintJobStateChangeListener(this);
} else { onPrintJobStateChanged(null);
mPrintManager.removePrintJobStateChangeListener(this); } else {
mPrintManager.removePrintJobStateChangeListener(this);
}
} }
} }