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"; 18option java_multiple_files = true; 19 20import "frameworks/base/core/proto/android/privacy.proto"; 21 22package android.content.pm; 23 24message PackageItemInfoProto { 25 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 26 27 optional string name = 1; 28 optional string package_name = 2; 29 optional int32 label_res = 3; 30 optional string non_localized_label = 4; 31 optional int32 icon = 5; 32 optional int32 banner = 6; 33} 34 35// Proto of android.content.pm.ApplicationInfo which extends PackageItemInfo 36message ApplicationInfoProto { 37 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 38 39 optional PackageItemInfoProto package = 1; 40 optional string permission = 2; 41 optional string process_name = 3; 42 optional int32 uid = 4; 43 optional int32 flags = 5; 44 optional int32 private_flags = 6; 45 optional int32 theme = 7; 46 optional string source_dir = 8; 47 optional string public_source_dir = 9; 48 repeated string split_source_dirs = 10; 49 repeated string split_public_source_dirs = 11; 50 repeated string resource_dirs = 12; 51 optional string data_dir = 13; 52 optional string class_loader_name = 14; 53 repeated string split_class_loader_names = 15; 54 55 message Version { 56 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 57 58 optional bool enabled = 1; 59 optional int32 min_sdk_version = 2; 60 optional int32 target_sdk_version = 3; 61 optional int32 version_code = 4; 62 optional int32 target_sandbox_version = 5; 63 } 64 optional Version version = 16; 65 66 message Detail { 67 option (.android.msg_privacy).dest = DEST_EXPLICIT; 68 69 optional string class_name = 1; 70 optional string task_affinity = 2; 71 optional int32 requires_smallest_width_dp = 3; 72 optional int32 compatible_width_limit_dp = 4; 73 optional int32 largest_width_limit_dp = 5; 74 // String retrieved from the seinfo tag found in selinux policy. This value 75 // can be set through the mac_permissions.xml policy construct. This value 76 // is used for setting an SELinux security context on the process as well as 77 // its data directory. 78 optional string seinfo = 6; 79 // The seinfo tag generated per-user. This value may change based upon the 80 // user's configuration. For example, when an instant app is installed for a 81 // user. It is an error if this field is ever null when trying to 82 // start a new process. 83 optional string seinfo_user = 7; 84 // Full path to the device-protected directory assigned to the package for 85 // its persistent data. 86 optional string device_protected_data_dir = 8; 87 // Full path to the credential-protected directory assigned to the package 88 // for its persistent data. 89 optional string credential_protected_data_dir = 9; 90 // Paths to all shared libraries this application is linked against. This 91 // field is only set if the PackageManager.GET_SHARED_LIBRARY_FILES} flag 92 // was used when retrieving the structure. 93 repeated string shared_library_files = 10; 94 optional string manage_space_activity_name = 11; 95 optional int32 description_res = 12; 96 optional int32 ui_options = 13; 97 optional bool supports_rtl = 14; 98 oneof full_backup_content { 99 // An optional attribute that indicates the app supports automatic backup 100 // of app data. 0 is the default and means the app's entire data folder + 101 // managed external storage will be backed up; Any negative value 102 // indicates the app does not support full-data backup, though it may 103 // still want to participate via the traditional key/value backup API; A 104 // positive number specifies an xml resource in which the application has 105 // defined its backup include/exclude criteria. The data in this field is 106 // of the format "@xml/<number>". 107 string content = 15; 108 bool is_full_backup = 16; 109 } 110 optional int32 network_security_config_res = 17; 111 optional int32 category = 18; 112 } 113 optional Detail detail = 17; 114} 115