Log accessibility privacy warning status (2/2)

Uses the atom NonA11yToolServiceWarningReported in westworld to log
the accessibility privacy warning service has been disabled in
accessibility setting.

Bug: 180983963
Test: m statsd_testdrive && statsd_testdrive 384
Change-Id: I4fb23066159f3086aaaeff521f305266e58cf42d
This commit is contained in:
lucychang
2021-08-19 22:41:07 +08:00
parent 4056b335ce
commit 7f94301cd4
4 changed files with 54 additions and 0 deletions

View File

@@ -41,4 +41,21 @@ public final class AccessibilityStatsLogUtils {
return enabled ? SettingsStatsLog.ACCESSIBILITY_SERVICE_REPORTED__SERVICE_STATUS__ENABLED
: SettingsStatsLog.ACCESSIBILITY_SERVICE_REPORTED__SERVICE_STATUS__DISABLED;
}
/**
* Logs when the non-a11y category service is disabled. Calls this when the user disables the
* non-a11y category service for the first time.
*
* @param packageName package name of the service
* @param durationMills duration in milliseconds between starting the page and disabling the
* service
*/
static void logDisableNonA11yCategoryService(String packageName, long durationMills) {
com.android.internal.accessibility.util.AccessibilityStatsLogUtils
.logNonA11yToolServiceWarningReported(
packageName,
com.android.internal.accessibility.util.AccessibilityStatsLogUtils
.ACCESSIBILITY_PRIVACY_WARNING_STATUS_SERVICE_DISABLED,
durationMills);
}
}