diff options
author | 2020-04-23 03:30:52 +0000 | |
---|---|---|
committer | 2020-04-23 03:30:52 +0000 | |
commit | 30792c75fb8123dcf5d1f79fb566c3c544db1f01 (patch) | |
tree | ab9768332f7f9defe41f265193f2fe026e781f76 | |
parent | e91800d29022a924ff376914665e75a7a6fd8364 (diff) | |
parent | 81173e3211dd745ecf4de50a4921ed34ae442987 (diff) |
Merge "Add atoms for accessibility shortcut" into rvc-dev
-rw-r--r-- | cmds/statsd/src/atoms.proto | 39 | ||||
-rw-r--r-- | core/proto/android/stats/accessibility/accessibility_enums.proto | 35 |
2 files changed, 74 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 13e7ac1fd4a0..88824f0f8c1d 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -46,6 +46,7 @@ import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto" import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; +import "frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto"; import "frameworks/base/core/proto/android/stats/enums.proto"; import "frameworks/base/core/proto/android/stats/intelligence/enums.proto"; import "frameworks/base/core/proto/android/stats/launcher/launcher.proto"; @@ -423,6 +424,9 @@ message Atom { PackageInstallerV2Reported package_installer_v2_reported = 263 [(module) = "framework"]; UserLifecycleJourneyReported user_lifecycle_journey_reported = 264 [(module) = "framework"]; UserLifecycleEventOccurred user_lifecycle_event_occurred = 265 [(module) = "framework"]; + AccessibilityShortcutReported accessibility_shortcut_reported = + 266 [(module) = "framework"]; + AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "framework"]; SdkExtensionStatus sdk_extension_status = 354; // StatsdStats tracks platform atoms with ids upto 500. @@ -9441,3 +9445,38 @@ message UserLifecycleEventOccurred { } optional State state = 4; // Represents the state of an event (beginning/ending) } + +/** + * Logs when accessibility shortcut clicked. + * + * Logged from: + * frameworks/base/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java + */ +message AccessibilityShortcutReported { + // The accessibility feature(including installed a11y service, framework a11y feature, + // and installed a11y activity) package name that is assigned to the accessibility shortcut. + optional string package_name = 1; + + // The definition of the accessibility shortcut. + // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. + optional android.stats.accessibility.ShortcutType shortcut_type = 2; + + // The definition of the service status. + // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. + optional android.stats.accessibility.ServiceStatus service_status = 3; +} + +/** + * Logs when accessibility service status changed. + * + * Logged from: + * frameworks/base/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java + */ +message AccessibilityServiceReported { + // The accessibility service package name. + optional string package_name = 1; + + // The definition of the service status. + // From frameworks/base/core/proto/android/stats/accessibility/accessibility_enums.proto. + optional android.stats.accessibility.ServiceStatus service_status = 2; +} diff --git a/core/proto/android/stats/accessibility/accessibility_enums.proto b/core/proto/android/stats/accessibility/accessibility_enums.proto new file mode 100644 index 000000000000..5118ad5a322c --- /dev/null +++ b/core/proto/android/stats/accessibility/accessibility_enums.proto @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto2"; +package android.stats.accessibility; +option java_multiple_files = true; + +// The entry point of the accessibility shortcut. +enum ShortcutType { + UNKNOWN_TYPE = 0; + A11Y_BUTTON = 1; + VOLUME_KEY = 2; + TRIPLE_TAP = 3; + A11Y_BUTTON_LONG_PRESS = 4; +} + +// The service status code. +enum ServiceStatus { + UNKNOWN = 0; + ENABLED = 1; + DISABLED = 2; +}
\ No newline at end of file |