1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.os.statsd.grammaticalinflection; 20 21import "frameworks/proto_logging/stats/atoms.proto"; 22import "frameworks/proto_logging/stats/atom_field_options.proto"; 23 24option java_package = "com.android.os.grammaticalinflection"; 25option java_multiple_files = true; 26 27extend Atom { 28 optional ApplicationGrammaticalInflectionChanged application_grammatical_inflection_changed 29 = 584 [(module) = "framework"]; 30 optional SystemGrammaticalInflectionChanged system_grammatical_inflection_changed 31 = 816 [(module) = "framework"]; 32} 33 34/** 35 * Logs when app grammatical inflection changed. 36 * 37 * Logged from: 38 * frameworks/base/services/core/java/com/android/server/grammaticalinflection/GrammaticalInflectionService.java 39 */ 40message ApplicationGrammaticalInflectionChanged { 41 // The id for which component invokes this API. 42 optional SourceId source_id = 1; 43 44 // The uid for which the gender change is being done. 45 optional int32 target_uid = 2 [(is_uid) = true]; 46 47 // Indicate if the grammatical gender is specified in this change 48 optional bool is_grammatical_gender_specified = 3; 49 50 // Indicate if the grammatical gender was specified before this change 51 optional bool was_grammatical_gender_specified = 4; 52 53 // The caller id 54 enum SourceId { 55 UNKNOWN = 0; 56 57 // Frameworks invoke this API. It may happen when B&R. 58 FRAMEWORKS = 1; 59 60 // Apps invoke this API. 61 OTHERS = 2; 62 } 63} 64 65message SystemGrammaticalInflectionChanged { 66 // The id for which component invokes this API. 67 optional SourceId source_id = 1; 68 69 // Android user id, e.g. 0 is the owners. 70 optional int32 user_id = 2; 71 72 // Indicate if the grammatical gender is specified in this change. For example, user sets the 73 // grammatical gender to neutral, feminine or masculine from not_specified. 74 optional bool is_grammatical_gender_specified = 3; 75 76 // Indicate if the grammatical gender was specified before this change. For example, user sets the 77 // grammatical gender to not_specified from neutral, feminine or masculine. 78 optional bool was_grammatical_gender_specified = 4; 79 80 // The caller id 81 enum SourceId { 82 UNKNOWN = 0; 83 84 // System invokes this API. 85 SYSTEM = 1; 86 } 87} 88