1*795d594fSAndroid Build Coastguard Worker/* 2*795d594fSAndroid Build Coastguard Worker * Copyright (C) 2024 The Android Open Source Project 3*795d594fSAndroid Build Coastguard Worker * 4*795d594fSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*795d594fSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*795d594fSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*795d594fSAndroid Build Coastguard Worker * 8*795d594fSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*795d594fSAndroid Build Coastguard Worker * 10*795d594fSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*795d594fSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*795d594fSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*795d594fSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*795d594fSAndroid Build Coastguard Worker * limitations under the License. 15*795d594fSAndroid Build Coastguard Worker */ 16*795d594fSAndroid Build Coastguard Worker 17*795d594fSAndroid Build Coastguard Workersyntax = "proto2"; 18*795d594fSAndroid Build Coastguard Worker 19*795d594fSAndroid Build Coastguard Workerpackage com.android.server.art.proto; 20*795d594fSAndroid Build Coastguard Workeroption java_multiple_files = true; 21*795d594fSAndroid Build Coastguard Worker 22*795d594fSAndroid Build Coastguard Worker// These protobufs are currently used as an ART-internal API for pre-reboot 23*795d594fSAndroid Build Coastguard Worker// dexopt to pass parameters from a version of the ART module to a potentially 24*795d594fSAndroid Build Coastguard Worker// more recent version in an OTA package. It's a 1:1 mapping to the 25*795d594fSAndroid Build Coastguard Worker// BatchDexoptParams API used for (normal) batch dexopt. That approach does not 26*795d594fSAndroid Build Coastguard Worker// add any extra compatibility constraints, because: a) We need to keep the 27*795d594fSAndroid Build Coastguard Worker// BatchDexoptParams API for all SDK levels the ART module gets pushed to, and 28*795d594fSAndroid Build Coastguard Worker// b) we only allow pre-reboot dexopt from SDK level N to N+1. Since (a) always 29*795d594fSAndroid Build Coastguard Worker// has a longer support window than (b), we cannot end up in a situation where 30*795d594fSAndroid Build Coastguard Worker// these protobufs forces us to keep support for a feature we wouldn't need to 31*795d594fSAndroid Build Coastguard Worker// keep anyway for batch dexopt. 32*795d594fSAndroid Build Coastguard Worker 33*795d594fSAndroid Build Coastguard Worker// The protobuf representation of `BatchDexoptParams`. See classes in 34*795d594fSAndroid Build Coastguard Worker// java/com/android/server/art/model/BatchDexoptParams.java and 35*795d594fSAndroid Build Coastguard Worker// java/com/android/server/art/model/DexoptParams.java for details. 36*795d594fSAndroid Build Coastguard Worker// Fields added to classes after Android B must be optional in the protos. 37*795d594fSAndroid Build Coastguard Workermessage BatchDexoptParamsProto { 38*795d594fSAndroid Build Coastguard Worker // Required. 39*795d594fSAndroid Build Coastguard Worker repeated string package = 1; 40*795d594fSAndroid Build Coastguard Worker // Required. 41*795d594fSAndroid Build Coastguard Worker optional DexoptParamsProto dexopt_params = 2; 42*795d594fSAndroid Build Coastguard Worker} 43*795d594fSAndroid Build Coastguard Worker 44*795d594fSAndroid Build Coastguard Worker// The protobuf representation of `DexoptParams`. 45*795d594fSAndroid Build Coastguard Worker// Note that this is only for batch dexopt. Particularly, it doesn't have a field for the split 46*795d594fSAndroid Build Coastguard Worker// name. 47*795d594fSAndroid Build Coastguard Workermessage DexoptParamsProto { 48*795d594fSAndroid Build Coastguard Worker // Required. 49*795d594fSAndroid Build Coastguard Worker optional int32 flags = 1; 50*795d594fSAndroid Build Coastguard Worker // Required. 51*795d594fSAndroid Build Coastguard Worker optional string compiler_filter = 2; 52*795d594fSAndroid Build Coastguard Worker // Required. 53*795d594fSAndroid Build Coastguard Worker optional int32 priority_class = 3; 54*795d594fSAndroid Build Coastguard Worker // Required. 55*795d594fSAndroid Build Coastguard Worker optional string reason = 4; 56*795d594fSAndroid Build Coastguard Worker} 57