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 19package android.os.incidentd; 20 21import "frameworks/base/core/proto/android/os/metadata.proto"; 22 23message ReportFileProto { 24 /** 25 * Metadata about each of the calls to reportIncident that 26 * initiated the incident report. 27 */ 28 message Report { 29 /** 30 * Package name for broadcast receiver to be told when 31 * the report is complete. 32 */ 33 optional string pkg = 1; 34 35 /** 36 * Class name for broadcast receiver to be told when 37 * the report is complete. 38 */ 39 optional string cls = 2; 40 41 /** 42 * Privacy policy at which this report should be shared. 43 */ 44 optional uint32 privacy_policy = 4; 45 46 /** 47 * Whether all available sections should be returned. 48 */ 49 optional bool all_sections = 5; 50 51 /** 52 * If all_sections is not true, then this is the 53 * list of sections that were requested. 54 */ 55 repeated int32 section = 6; 56 57 /** 58 * Flattened IncidentHeaderProto that was passed with this 59 * request. 60 */ 61 repeated bytes header = 7; 62 63 /** 64 * Whether the user has approved this report to be shared with 65 * the given client. 66 */ 67 optional bool share_approved = 8; 68 } 69 70 /** 71 * Metadata section recorded while the incident report 72 * was taken. 73 */ 74 optional android.os.IncidentMetadata metadata = 1; 75 76 /** 77 * Report data structures for the incident reports. 78 */ 79 repeated Report report = 2; 80 81 /** 82 * The file name, relative to the work directory where 83 * the data file is stored. The content of the data file 84 * is an android.os.IncidentProto, without the metadata 85 * or header sections. 86 */ 87 optional string data_file = 3; 88 89 /** 90 * The privacy policy to which the file is already filtered. 91 */ 92 optional uint32 privacy_policy = 4; 93 94 /** 95 * How big the data file is expected to be. If the size 96 * recorded here and the size on disk mismatch, then we 97 * know there was an error. 98 */ 99 optional int64 data_file_size = 5; 100 101 /** 102 * Whether this report has been finished, and is now 103 * ready for broadcast / dropbox / etc. 104 */ 105 optional bool completed = 6; 106} 107 108