diff options
author | Chris Wren <cwren@android.com> | 2015-07-30 14:27:02 -0400 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2015-07-30 16:29:20 -0400 |
commit | dcc34fd8a3f718e5e5cfaccb87eeffd64ac80f63 (patch) | |
tree | b7de86e1d842a3cfdd7ab77dcefceaebd886368c /packages/PrintSpooler | |
parent | 30c5da9cc20cc4b9ce820963c6f58d7826f46eaa (diff) | |
download | frameworks_base-dcc34fd8a3f718e5e5cfaccb87eeffd64ac80f63.zip frameworks_base-dcc34fd8a3f718e5e5cfaccb87eeffd64ac80f63.tar.gz frameworks_base-dcc34fd8a3f718e5e5cfaccb87eeffd64ac80f63.tar.bz2 |
Instrument printing service for metrics collection.
Bug: 22837316
Change-Id: I8bf62940f5eb495d8d7a10df958d9bc8ad76662a
Diffstat (limited to 'packages/PrintSpooler')
-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(); |