diff options
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java | 2 | ||||
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java index 49e6740..bafccae 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java @@ -46,6 +46,7 @@ import android.util.Log; import android.util.Slog; import android.util.Xml; +import com.android.internal.logging.MetricsLogger; import com.android.internal.os.HandlerCaller; import com.android.internal.util.FastXmlSerializer; import com.android.printspooler.R; @@ -493,6 +494,7 @@ public final class PrintSpoolerService extends Service { Slog.i(LOG_TAG, "[STATE CHANGED] " + printJob); } + MetricsLogger.histogram(this, "print_job_state", state); switch (state) { case PrintJobInfo.STATE_COMPLETED: case PrintJobInfo.STATE_CANCELED: diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index 6baa4b3..e8a5e43 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -72,6 +72,7 @@ import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; +import com.android.internal.logging.MetricsLogger; import com.android.printspooler.R; import com.android.printspooler.model.MutexFileProvider; import com.android.printspooler.model.PrintSpoolerProvider; @@ -325,6 +326,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat if (mState != STATE_INITIALIZING && mCurrentPrinter != null) { mPrinterRegistry.setTrackedPrinter(mCurrentPrinter.getId()); } + MetricsLogger.count(this, "print_preview", 1); } @Override @@ -1074,6 +1076,8 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat private void confirmPrint() { setState(STATE_PRINT_CONFIRMED); + MetricsLogger.count(this, "print_confirmed", 1); + updateOptionsUi(); addCurrentPrinterToHistory(); |