• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017 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
19option java_package = "android";
20option java_multiple_files = true;
21
22import "google/protobuf/descriptor.proto";
23
24package android;
25
26// SectionType defines how incidentd gonna get the field's data
27enum SectionType {
28
29    // Default fields, not available in incidentd
30    SECTION_NONE = 0;
31
32    // incidentd reads a file to get the data for annotated field
33    SECTION_FILE = 1;
34
35    // incidentd executes the given command for annotated field
36    SECTION_COMMAND = 2;
37
38    // incidentd calls dumpsys for annotated field
39    SECTION_DUMPSYS = 3;
40
41    // incidentd calls logs for annotated field
42    SECTION_LOG = 4;
43
44    // incidentd read file and gzip the data in bytes field
45    SECTION_GZIP = 5;
46
47    // incidentd calls tombstoned for annotated field
48    SECTION_TOMBSTONE = 6;
49
50    // incidentd calls legacy text dumpsys for annotated field. The section will only be generated
51    // on userdebug and eng builds.
52    SECTION_TEXT_DUMPSYS = 7;
53}
54
55message SectionFlags {
56  optional SectionType type = 1 [default = SECTION_NONE];
57  optional string args = 2;
58  // If true, then the section will only be generated for userdebug and eng
59  // builds.
60  optional bool userdebug_and_eng_only = 3 [default = false];
61}
62
63extend google.protobuf.FieldOptions {
64    // Flags for automatically section list generation
65    optional SectionFlags section = 155792027;
66}
67