Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 463b307d authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed AUTOFILL_SERVICE_DISABLED_APP and AUTOFILL_SERVICE_DISABLED_ACTIVITY.

These metric were using the RESERVED_FOR_LOGBUILDER_COUNTER and hence were not
being picked up.

Bug: 71863561

Test:  adb shell logcat -b events | grep sysui | egrep '(1231|1232)'

Change-Id: I34136ac3423e819b37fc3c14c1821171af1868d9
parent 2a5a43d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4872,17 +4872,17 @@ message MetricsEvent {

    // An autofill service asked to disable autofill for a given application.
    // Package: Package of app that is being disabled for autofill
    // Counter: duration (in ms) that autofill will be disabled
    // OS: P
    // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
    // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
    AUTOFILL_SERVICE_DISABLED_APP = 1231;

    // An autofill service asked to disable autofill for a given activity.
    // Package: Package of app whose activity is being disabled for autofill
    // Counter: duration (in ms) that autofill will be disabled
    // OS: P
    // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
    // Tag FIELD_CLASS_NAME: Class name of the activity that is being disabled for autofill
    // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
    AUTOFILL_SERVICE_DISABLED_ACTIVITY = 1232;

    // ACTION: Stop an app and turn on background check
+2 −2
Original line number Diff line number Diff line
@@ -1066,7 +1066,7 @@ final class AutofillManagerServiceImpl {
            int intDuration = duration > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) duration;
            mMetricsLogger.write(Helper.newLogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_APP,
                    packageName, getServicePackageName())
                    .setCounterValue(intDuration));
                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
        }
    }

@@ -1090,7 +1090,7 @@ final class AutofillManagerServiceImpl {
            mMetricsLogger.write(new LogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_ACTIVITY)
                    .setComponentName(componentName)
                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, getServicePackageName())
                    .setCounterValue(intDuration));
                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
        }
    }