1/* 2 * Copyright (C) 2024 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 com.android.server.art.proto; 20option java_multiple_files = true; 21 22// These protobufs are currently used as an ART-internal API for pre-reboot 23// dexopt to pass parameters from a version of the ART module to a potentially 24// more recent version in an OTA package. It's a 1:1 mapping to the 25// BatchDexoptParams API used for (normal) batch dexopt. That approach does not 26// add any extra compatibility constraints, because: a) We need to keep the 27// BatchDexoptParams API for all SDK levels the ART module gets pushed to, and 28// b) we only allow pre-reboot dexopt from SDK level N to N+1. Since (a) always 29// has a longer support window than (b), we cannot end up in a situation where 30// these protobufs forces us to keep support for a feature we wouldn't need to 31// keep anyway for batch dexopt. 32 33// The protobuf representation of `BatchDexoptParams`. See classes in 34// java/com/android/server/art/model/BatchDexoptParams.java and 35// java/com/android/server/art/model/DexoptParams.java for details. 36// Fields added to classes after Android B must be optional in the protos. 37message BatchDexoptParamsProto { 38 // Required. 39 repeated string package = 1; 40 // Required. 41 optional DexoptParamsProto dexopt_params = 2; 42} 43 44// The protobuf representation of `DexoptParams`. 45// Note that this is only for batch dexopt. Particularly, it doesn't have a field for the split 46// name. 47message DexoptParamsProto { 48 // Required. 49 optional int32 flags = 1; 50 // Required. 51 optional string compiler_filter = 2; 52 // Required. 53 optional int32 priority_class = 3; 54 // Required. 55 optional string reason = 4; 56} 57