066575b95f
Add a new field to the proto messages flag_declaration and parsed_flag. The new field will be used verbatim as a parameter when calling DeviceConfig.getBoolean to read the value of a READ_WRITE flag. See the DeviceConfig API for more info. Note: not to be confused with the old namespace field, which has been renamed to package. Bug: 285211724 Test: atest aconfig.test Change-Id: I2181be7b5e98fc334e5277fb5f7e386f1fe0b550
80 lines
2 KiB
Protocol Buffer
80 lines
2 KiB
Protocol Buffer
// Copyright (C) 2023 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
|
|
|
|
// This is the schema definition for aconfig files. Modifications need to be
|
|
// either backwards compatible, or include updates to all aconfig files in the
|
|
// Android tree.
|
|
|
|
syntax = "proto2";
|
|
|
|
package android.aconfig;
|
|
|
|
// messages used in both aconfig input and output
|
|
|
|
enum flag_state {
|
|
ENABLED = 1;
|
|
DISABLED = 2;
|
|
}
|
|
|
|
enum flag_permission {
|
|
READ_ONLY = 1;
|
|
READ_WRITE = 2;
|
|
}
|
|
|
|
// aconfig input messages: flag declarations and values
|
|
|
|
message flag_declaration {
|
|
required string name = 1;
|
|
required string namespace = 2;
|
|
required string description = 3;
|
|
};
|
|
|
|
message flag_declarations {
|
|
required string package = 1;
|
|
repeated flag_declaration flag = 2;
|
|
};
|
|
|
|
message flag_value {
|
|
required string package = 1;
|
|
required string name = 2;
|
|
required flag_state state = 3;
|
|
required flag_permission permission = 4;
|
|
};
|
|
|
|
message flag_values {
|
|
repeated flag_value flag_value = 1;
|
|
};
|
|
|
|
// aconfig output messages: parsed and verified flag declarations and values
|
|
|
|
message tracepoint {
|
|
// path to declaration or value file relative to $TOP
|
|
required string source = 1;
|
|
required flag_state state = 2;
|
|
required flag_permission permission = 3;
|
|
}
|
|
|
|
message parsed_flag {
|
|
required string package = 1;
|
|
required string name = 2;
|
|
required string namespace = 3;
|
|
required string description = 4;
|
|
required flag_state state = 5;
|
|
required flag_permission permission = 6;
|
|
repeated tracepoint trace = 7;
|
|
}
|
|
|
|
message parsed_flags {
|
|
repeated parsed_flag parsed_flag = 1;
|
|
}
|