1/* 2 * Copyright (C) 2019 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; 20option java_package = "com.android.os"; 21option java_multiple_files = true; 22option java_outer_classname = "ActiveConfigProto"; 23 24message ActiveEventActivation { 25 optional int32 atom_matcher_index = 1; 26 27 // Time left in activation. When this proto is loaded after device boot, 28 // the activation should be set to active for this duration. 29 // This field will only be set when the state is ACTIVE 30 optional int64 remaining_ttl_nanos = 2; 31 32 enum State { 33 UNNKNOWN = 0; 34 // This metric should activate for remaining_ttl_nanos when we load the activations. 35 ACTIVE = 1; 36 // When we load the activations, this metric should activate on next boot for the tll 37 // specified in the config. 38 ACTIVATE_ON_BOOT = 2; 39 } 40 optional State state = 3; 41} 42 43message ActiveMetric { 44 optional int64 id = 1; 45 repeated ActiveEventActivation activation = 2; 46} 47 48message ActiveConfig { 49 optional int64 id = 1; 50 optional int32 uid = 2; 51 repeated ActiveMetric metric = 3; 52} 53 54// all configs and their metrics on device. 55message ActiveConfigList { 56 repeated ActiveConfig config = 1; 57} 58