1 /*
2  * Copyright (C) 2021 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 
17 package com.android.server.pm.dex;
18 
19 import java.util.List;
20 
21 /**
22  * Holds package information relevant to ART use cases.
23  */
24 public class ArtPackageInfo {
25     private final String mPackageName;
26     private final List<String> mInstructionSets;
27     private final List<String> mCodePaths;
28     // TODO: This should be computed on the fly in PackageDexOptimizer / DexManager, but the
29     // logic is too complicated to do it in a single re-factoring.
30     private final String mOatDir;
31 
ArtPackageInfo( String packageName, List<String> instructionSets, List<String> codePaths, String oatDir)32     public ArtPackageInfo(
33             String packageName,
34             List<String> instructionSets,
35             List<String> codePaths,
36             String oatDir) {
37         mPackageName = packageName;
38         mInstructionSets = instructionSets;
39         mCodePaths = codePaths;
40         mOatDir = oatDir;
41     }
42 
getPackageName()43     public String getPackageName() {
44         return mPackageName;
45     }
46 
getInstructionSets()47     public List<String> getInstructionSets() {
48         return mInstructionSets;
49     }
50 
getCodePaths()51     public List<String> getCodePaths() {
52         return mCodePaths;
53     }
54 
getOatDir()55     public String getOatDir() {
56         return mOatDir;
57     }
58 }
59