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"; 18package com.android.permissioncontroller.incident; 19 20option java_multiple_files = true; 21 22 23/* 24 * Everything in this file is a subset of the platform incident.proto. 25 */ 26 27/** 28 * This message has the same fields in an incident report that we care about 29 * but none of the ones we don't. So when we receive one, we attempt to parse 30 * it using this proto, which will result in the rest of the fields being dropped. 31 * 32 * From frameworks/base/core/proto/android/os/incident.proto 33 */ 34message IncidentMinimal { 35 repeated IncidentHeaderProto header = 1; 36 optional RestrictedImagesDumpProto restricted_images_section = 3025; 37} 38 39/** 40 * From frameworks/base/core/proto/android/os/header.proto 41 */ 42message IncidentHeaderProto { 43 // A human readable reason why an incident report is requested. 44 optional string reason = 2; 45} 46 47/** 48 * From frameworks/base/core/proto/android/service/restricted_image.proto 49 */ 50message RestrictedImagesDumpProto { 51 repeated RestrictedImageSetProto sets = 1; 52} 53 54/** 55 * From frameworks/base/core/proto/android/service/restricted_image.proto 56 */ 57message RestrictedImageSetProto { 58 // Name of the service producing the data. 59 optional string category = 1; 60 61 // The images 62 repeated RestrictedImageProto images = 2; 63 64 // Additional metadata 65 optional bytes metadata = 3; 66} 67 68/** 69 * From frameworks/base/core/proto/android/service/restricted_image.proto 70 */ 71message RestrictedImageProto { 72 // Type of image data 73 optional string mime_type = 1; 74 75 // The image data 76 optional bytes image_data = 2; 77 78 // Metadata about the image. Typically this has another proto schema, 79 // but it is undefined exactly what that is in AOSP code. 80 optional bytes metadata = 3; 81} 82 83