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
|
@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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user