Do not count print jobs if printing is not available.
Bug: 27339883 Change-Id: I0b0761917798581e831e8b2692fdc9c5fefb1155
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user