* commit 'ca3a3650e41449eb9d3b9643e844b7506d77759f': Instrument printing service for metrics collection.
This commit is contained in:
@@ -46,6 +46,7 @@ import android.util.Log;
|
|||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
|
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
import com.android.internal.os.HandlerCaller;
|
import com.android.internal.os.HandlerCaller;
|
||||||
import com.android.internal.util.FastXmlSerializer;
|
import com.android.internal.util.FastXmlSerializer;
|
||||||
import com.android.printspooler.R;
|
import com.android.printspooler.R;
|
||||||
@@ -493,6 +494,7 @@ public final class PrintSpoolerService extends Service {
|
|||||||
Slog.i(LOG_TAG, "[STATE CHANGED] " + printJob);
|
Slog.i(LOG_TAG, "[STATE CHANGED] " + printJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetricsLogger.histogram(this, "print_job_state", state);
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case PrintJobInfo.STATE_COMPLETED:
|
case PrintJobInfo.STATE_COMPLETED:
|
||||||
case PrintJobInfo.STATE_CANCELED:
|
case PrintJobInfo.STATE_CANCELED:
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ import android.widget.ImageView;
|
|||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
import com.android.printspooler.R;
|
import com.android.printspooler.R;
|
||||||
import com.android.printspooler.model.MutexFileProvider;
|
import com.android.printspooler.model.MutexFileProvider;
|
||||||
import com.android.printspooler.model.PrintSpoolerProvider;
|
import com.android.printspooler.model.PrintSpoolerProvider;
|
||||||
@@ -325,6 +326,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
|
|||||||
if (mState != STATE_INITIALIZING && mCurrentPrinter != null) {
|
if (mState != STATE_INITIALIZING && mCurrentPrinter != null) {
|
||||||
mPrinterRegistry.setTrackedPrinter(mCurrentPrinter.getId());
|
mPrinterRegistry.setTrackedPrinter(mCurrentPrinter.getId());
|
||||||
}
|
}
|
||||||
|
MetricsLogger.count(this, "print_preview", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1074,6 +1076,8 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
|
|||||||
private void confirmPrint() {
|
private void confirmPrint() {
|
||||||
setState(STATE_PRINT_CONFIRMED);
|
setState(STATE_PRINT_CONFIRMED);
|
||||||
|
|
||||||
|
MetricsLogger.count(this, "print_confirmed", 1);
|
||||||
|
|
||||||
updateOptionsUi();
|
updateOptionsUi();
|
||||||
addCurrentPrinterToHistory();
|
addCurrentPrinterToHistory();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user