diff options
| author | Felipe Leme <felipeal@google.com> | 2018-05-07 10:18:47 -0700 |
|---|---|---|
| committer | Felipe Leme <felipeal@google.com> | 2018-05-07 12:14:00 -0700 |
| commit | 1116652087c5889a98ff6d736e127fc0e97dbe37 (patch) | |
| tree | 0311207975b749a34e624d88c70e814a47027e8c /core/java/android | |
| parent | a914cf0affec53cddd68051663ccc945e5088419 (diff) | |
New FIELD_AUTOFILL_COMPAT_MODE field.
This field is used on pretty much all Autofill metrics, except
AUTOFILL_USERDATA_UPDATED, AUTOFILL_SERVICE_DISABLED_SELF, and
AUTOFILL_INVALID_PERMISSION.
Test: atest CtsAutoFillServiceTestCases
Test: adb shell logcat -b events | grep sysui
Bug: 79351659
Change-Id: I2e2f3dcc780a3896162b158926f5ee89c7cb342d
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/autofill/AutofillManager.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java index 88300dbda1c4..4c7dc116d167 100644 --- a/core/java/android/view/autofill/AutofillManager.java +++ b/core/java/android/view/autofill/AutofillManager.java @@ -1132,8 +1132,7 @@ public final class AutofillManager { if (mSaveTriggerId != null && mSaveTriggerId.equals(id)) { if (sDebug) Log.d(TAG, "triggering commit by click of " + id); commitLocked(); - mMetricsLogger.action(MetricsEvent.AUTOFILL_SAVE_EXPLICITLY_TRIGGERED, - mContext.getPackageName()); + mMetricsLogger.write(newLog(MetricsEvent.AUTOFILL_SAVE_EXPLICITLY_TRIGGERED)); } } } @@ -1893,14 +1892,19 @@ public final class AutofillManager { } } - final LogMaker log = new LogMaker(MetricsEvent.AUTOFILL_DATASET_APPLIED) - .setPackageName(mContext.getPackageName()) + mMetricsLogger.write(newLog(MetricsEvent.AUTOFILL_DATASET_APPLIED) .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VALUES, itemCount) - .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED, numApplied); - mMetricsLogger.write(log); + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED, numApplied)); } } + private LogMaker newLog(int category) { + return new LogMaker(category) + .setPackageName(mContext.getPackageName()) + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_COMPAT_MODE, + isCompatibilityModeEnabledLocked() ? 1 : 0); + } + /** * Set the tracked views. * |
