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.locale; 20 21import "frameworks/proto_logging/stats/atom_field_options.proto"; 22 23option java_package = "com.android.os.locale"; 24option java_multiple_files = true; 25 26/** 27 * Logs when an override of app-specific supported locales is changed. 28 * Logged from 29 * frameworks/base/services/core/java/com/android/server/locales/LocaleManagerService.java 30 */ 31message AppSupportedLocalesChanged { 32 // The uid which invoked this update. 33 optional int32 calling_uid = 1 [(is_uid) = true]; 34 35 // The uid for which the override of app’s supported locales change is being done. 36 optional int32 target_uid = 2 [(is_uid) = true]; 37 38 // The total number of locales in the override LocaleConfig. 39 optional int32 num_locales = 3; 40 41 42 // Whether to remove the override LocaleConfig from the storage. 43 optional bool remove_override = 4; 44 45 // Whether the new override LocaleConfig is the same as the app’s LocaleConfig. 46 optional bool same_as_resource_localeconfig = 5; 47 48 // Whether the new override LocaleConfig is the same as the previously effective one. This means 49 // a comparison with the previous override LocaleConfig if there was one, and a comparison with 50 // the resource LocaleConfig if no override was present. 51 optional bool same_as_previous_localeconfig = 6; 52 53 // Application supported locales changed status. 54 enum Status { 55 // A placeholder for unspecified values. 56 STATUS_UNSPECIFIED = 0; 57 58 // New override of supported locales is set successfully. 59 SUCCESS = 1; 60 61 // The new override fails to be written to the storage. 62 FAILURE_WRITE_TO_STORAGE = 2; 63 64 // The target package is invalid. 65 FAILURE_INVALID_TARGET_PACKAGE = 3; 66 67 // The calling package doesn't have the required permission. 68 FAILURE_PERMISSION_ABSENT = 4; 69 } 70 71 optional Status status = 7; 72} 73