diff options
author | Chris Wren <cwren@android.com> | 2015-08-01 16:38:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-01 16:38:10 +0000 |
commit | b35152cb182a0d25c896d27acf4bedb93f03cadc (patch) | |
tree | 02850f817cb74c0ccdb0d472b7a2a802e554a72b /packages/PrintSpooler | |
parent | 44b3a009479f7987fe3d781ac6fa7a47db210888 (diff) | |
parent | ca3a3650e41449eb9d3b9643e844b7506d77759f (diff) | |
download | frameworks_base-b35152cb182a0d25c896d27acf4bedb93f03cadc.zip frameworks_base-b35152cb182a0d25c896d27acf4bedb93f03cadc.tar.gz frameworks_base-b35152cb182a0d25c896d27acf4bedb93f03cadc.tar.bz2 |
am ca3a3650: am 6e75e7dd: Merge "Instrument printing service for metrics collection." into mnc-dev
* commit 'ca3a3650e41449eb9d3b9643e844b7506d77759f':
Instrument printing service for metrics collection.
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(); |