@Override public void setListening(boolean isListening) { if (mPrintManager != null) { if (isListening) { mPrintManager.addPrintJobStateChangeListener(this); onPrintJobStateChanged(null); } else { mPrintManager.removePrintJobStateChangeListener(this); } } }
@Override protected void onReset() { if (DEBUG) { Log.i(LOG_TAG, "onReset()"); } // Stop loading. onStopLoading(); // Clear the cached result. mPrintJobs.clear(); // Stop watching for changes. if (mPrintJobStateChangeListener != null) { mPrintManager.removePrintJobStateChangeListener(mPrintJobStateChangeListener); mPrintJobStateChangeListener = null; } }