1/* 2 * Copyright (C) 2024 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.packagemanager; 20 21import "frameworks/proto_logging/stats/atoms.proto"; 22import "frameworks/proto_logging/stats/atom_field_options.proto"; 23 24option java_package = "com.android.os.packagemanager"; 25option java_multiple_files = true; 26 27extend Atom { 28 optional ComponentStateChangedReported component_state_changed_reported = 863 29 [(module) = "framework"]; 30} 31 32/** 33 * Logs the status of the component is changed. 34 */ 35message ComponentStateChangedReported { 36 // The state of component. 37 enum ComponentState { 38 // This component is in its default state. 39 COMPONENT_STATE_DEFAULT = 0; 40 41 // This component has been explicitly enabled. 42 COMPONENT_STATE_ENABLED = 1; 43 44 // This component has been explicitly disabled. 45 COMPONENT_STATE_DISABLED = 2; 46 47 // The user has explicitly disabled the component. 48 COMPONENT_STATE_DISABLED_USER = 3; 49 50 // This component should be considered, until the 51 // point where the user actually wants to use it. 52 COMPONENT_STATE_DISABLED_UNTIL_USED = 4; 53 } 54 55 // The UID for which the application is active. 56 optional int32 uid = 1 [(is_uid) = true]; 57 58 // The old state of component. 59 optional ComponentState component_old_state = 2; 60 61 // The new state of component. 62 optional ComponentState component_new_state = 3; 63 64 // True if it is a launcher component. 65 optional bool is_launcher = 4; 66 67 // True if it is for whole app. False if it is for a component. 68 optional bool is_for_whole_app = 5; 69 70 // The UID for which the application calls this method. 71 optional int32 calling_uid = 6 [(is_uid) = true]; 72} 73