1 /* 2 * Copyright (C) 2022 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.internal.pm.pkg.parsing; 18 19 import android.content.pm.ApplicationInfo; 20 import android.content.pm.PackageInfo; 21 22 /** 23 * Methods that normal consumers should not have access to. This usually means the field is stateful 24 * or deprecated and should be access through a utility class or a system manager class. 25 * <p> 26 * This is a separate interface, not implemented by the base {@link ParsingPackage} because Java 27 * doesn't support non-public interface methods. The class must be cast to this interface. 28 * 29 * @hide 30 */ 31 public interface ParsingPackageHidden { 32 33 /** 34 * @see PackageInfo#versionCode 35 * @see ApplicationInfo#versionCode 36 */ getVersionCode()37 int getVersionCode(); 38 39 /** 40 * @see PackageInfo#versionCodeMajor 41 */ getVersionCodeMajor()42 int getVersionCodeMajor(); 43 44 // TODO(b/135203078): Hide and enforce going through PackageInfoUtils toAppInfoWithoutState()45 ApplicationInfo toAppInfoWithoutState(); 46 } 47