Home
last modified time | relevance | path

Searched refs:PackageParser (Results 1 – 25 of 60) sorted by relevance

123

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageParserTest.java24 import android.content.pm.PackageParser;
69 PackageParser pp = new CachePackageNameParser(); in testParse_noCache()
70 PackageParser.Package pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in testParse_noCache()
86 PackageParser pp = new CachePackageNameParser(); in testParse_withCache()
94 PackageParser.Package pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in testParse_withCache()
115 PackageParser pp = new PackageParser(); in test_serializePackage()
118 PackageParser.Package pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in test_serializePackage()
125 PackageParser.Package deserialized = new PackageParser.Package(p); in test_serializePackage()
134 PackageParser.Package pkg = new PackageParser.Package("foo"); in test_roundTripKnownFields()
141 PackageParser.Package deserialized = new PackageParser.Package(p); in test_roundTripKnownFields()
[all …]
DKeySetManagerServiceTest.java20 import android.content.pm.PackageParser;
64 PublicKey keyA = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyA); in testPublicKeyCertReprEquiv()
65 PublicKey keyB = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyB); in testPublicKeyCertReprEquiv()
66 PublicKey keyC = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyC); in testPublicKeyCertReprEquiv()
100 PublicKey keyA = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyA); in testEncodePublicKey()
101 PublicKey keyB = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyB); in testEncodePublicKey()
102 PublicKey keyC = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyC); in testEncodePublicKey()
120 PublicKey keyA = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyA); in testAddSigningKSToPackageEmpty()
147 PublicKey keyA = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyA); in testAddSigningKSToPackageUpgradeSame()
177 PublicKey keyA = PackageParser.parsePublicKey(KeySetStrings.ctsKeySetPublicKeyA); in testAddSigningKSToPackageUpgradeDiff()
[all …]
DParallelPackageParserTest.java19 import android.content.pm.PackageParser;
76 protected PackageParser.Package parsePackage(PackageParser packageParser, File scanFile, in parsePackage()
77 int parseFlags) throws PackageParser.PackageParserException { in parsePackage()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DDefaultPermissionGrantPolicy.java37 import android.content.pm.PackageParser;
272 private void grantRuntimePermissionsForPackage(int userId, PackageParser.Package pkg) { in grantRuntimePermissionsForPackage()
292 final PackageParser.Package pkg = mServiceInternal.getPackage(packageName); in grantAllRuntimePermissions()
308 final PackageParser.Package pkg = mServiceInternal.getPackage(packageName); in grantPermissionsToSysComponentsAndPrivApps()
362 PackageParser.Package installerPackage = getSystemPackage(installerPackageName); in grantDefaultSystemHandlerPermissions()
371 PackageParser.Package verifierPackage = getSystemPackage(verifierPackageName); in grantDefaultSystemHandlerPermissions()
382 PackageParser.Package setupPackage = getSystemPackage(setupWizardPackageName); in grantDefaultSystemHandlerPermissions()
393 PackageParser.Package cameraPackage = getDefaultSystemHandlerActivityPackage( in grantDefaultSystemHandlerPermissions()
403 PackageParser.Package mediaStorePackage = getDefaultProviderAuthorityPackage( in grantDefaultSystemHandlerPermissions()
411 PackageParser.Package downloadsPackage = getDefaultProviderAuthorityPackage( in grantDefaultSystemHandlerPermissions()
[all …]
DPermissionManagerInternal.java21 import android.content.pm.PackageParser;
26 import android.content.pm.PackageParser.Permission;
72 public abstract boolean isPermissionsReviewRequired(PackageParser.Package pkg, int userId); in isPermissionsReviewRequired()
78 @NonNull PackageParser.Package pkg, int callingUid, in grantRuntimePermissionsGrantedToDisabledPackage()
81 @NonNull PackageParser.Package pkg, @NonNull int[] userIds, in grantRequestedRuntimePermissions()
89 @Nullable PackageParser.Package pkg, boolean replaceGrant, in updatePermissions()
90 @NonNull Collection<PackageParser.Package> allPacakges, PermissionCallback callback); in updatePermissions()
92 @NonNull Collection<PackageParser.Package> allPacakges, PermissionCallback callback); in updateAllPermissions()
105 @NonNull PackageParser.Package newPackage, in revokeRuntimePermissionsIfGroupChanged()
106 @NonNull PackageParser.Package oldPackage, in revokeRuntimePermissionsIfGroupChanged()
[all …]
DPermissionManagerService.java35 import android.content.pm.PackageParser;
38 import android.content.pm.PackageParser.Package;
216 final PackageParser.Package pkg = mPackageManagerInt.getPackage(pkgName); in checkPermission()
246 private int checkUidPermission(String permName, PackageParser.Package pkg, int uid, in checkUidPermission()
303 return PackageParser.generatePermissionGroupInfo( in getPermissionGroupInfo()
316 for (PackageParser.PermissionGroup pg : mSettings.mPermissionGroups.values()) { in getAllPermissionGroups()
317 out.add(PackageParser.generatePermissionGroupInfo(pg, flags)); in getAllPermissionGroups()
377 final PackageParser.Package pkg = mPackageManagerInt.getPackage(packageName); in adjustPermissionProtectionFlagsLocked()
406 @NonNull PackageParser.Package newPackage, in revokeRuntimePermissionsIfGroupChanged()
407 @NonNull PackageParser.Package oldPackage, in revokeRuntimePermissionsIfGroupChanged()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageManagerServiceUtils.java39 import android.content.pm.PackageParser;
40 import android.content.pm.PackageParser.PackageParserException;
118 public static void sortPackagesByUsageDate(List<PackageParser.Package> pkgs, in sortPackagesByUsageDate()
133 private static void applyPackageFilter(Predicate<PackageParser.Package> filter, in applyPackageFilter()
134 Collection<PackageParser.Package> result, in applyPackageFilter()
135 Collection<PackageParser.Package> packages, in applyPackageFilter()
136 @NonNull List<PackageParser.Package> sortTemp, in applyPackageFilter()
138 for (PackageParser.Package pkg : packages) { in applyPackageFilter()
147 for (PackageParser.Package pkg : sortTemp) { in applyPackageFilter()
150 Collection<PackageParser.Package> deps = in applyPackageFilter()
[all …]
DParallelPackageParser.java19 import android.content.pm.PackageParser;
49 private final PackageParser.Callback mPackageParserCallback;
58 DisplayMetrics metrics, File cacheDir, PackageParser.Callback callback) { in ParallelPackageParser()
68 PackageParser.Package pkg; // Parsed package
110 PackageParser pp = new PackageParser(); in submit()
136 protected PackageParser.Package parsePackage(PackageParser packageParser, File scanFile, in parsePackage()
137 int parseFlags) throws PackageParser.PackageParserException { in parsePackage()
DPackageUsage.java23 import android.content.pm.PackageParser;
39 class PackageUsage extends AbstractStatsBase<Map<String, PackageParser.Package>> {
55 protected void writeInternal(Map<String, PackageParser.Package> packages) { in writeInternal()
69 for (PackageParser.Package pkg : packages.values()) { in writeInternal()
93 protected void readInternal(Map<String, PackageParser.Package> packages) { in readInternal()
117 private void readVersion0LP(Map<String, PackageParser.Package> packages, InputStream in, in readVersion0LP()
131 PackageParser.Package pkg = packages.get(packageName); in readVersion0LP()
145 private void readVersion1LP(Map<String, PackageParser.Package> packages, InputStream in, in readVersion1LP()
157 PackageParser.Package pkg = packages.get(packageName); in readVersion1LP()
DSharedUserSetting.java21 import android.content.pm.PackageParser;
104 public @Nullable List<PackageParser.Package> getPackages() { in getPackages()
108 final ArrayList<PackageParser.Package> pkgList = new ArrayList<>(packages.size()); in getPackages()
129 final List<PackageParser.Package> pkgList = getPackages(); in fixSeInfoLocked()
134 for (PackageParser.Package pkg : pkgList) { in fixSeInfoLocked()
139 for (PackageParser.Package pkg : pkgList) { in fixSeInfoLocked()
DPackageSignatures.java26 import android.content.pm.PackageParser;
27 import android.content.pm.PackageParser.SigningDetails.SignatureSchemeVersion;
37 @NonNull PackageParser.SigningDetails mSigningDetails;
40 if (orig != null && orig.mSigningDetails != PackageParser.SigningDetails.UNKNOWN) { in PackageSignatures()
41 mSigningDetails = new PackageParser.SigningDetails(orig.mSigningDetails); in PackageSignatures()
43 mSigningDetails = PackageParser.SigningDetails.UNKNOWN; in PackageSignatures()
47 PackageSignatures(PackageParser.SigningDetails signingDetails) { in PackageSignatures()
52 mSigningDetails = PackageParser.SigningDetails.UNKNOWN; in PackageSignatures()
108 PackageParser.SigningDetails.Builder builder = in readXml()
109 new PackageParser.SigningDetails.Builder(); in readXml()
[all …]
DIntentFilterVerificationState.java20 import android.content.pm.PackageParser;
38 private ArrayList<PackageParser.ActivityIntentInfo> mFilters = new ArrayList<>();
69 public ArrayList<PackageParser.ActivityIntentInfo> getFilters() { in getFilters()
126 public void addFilter(PackageParser.ActivityIntentInfo filter) { in addFilter()
/frameworks/base/core/tests/coretests/src/android/content/pm/dex/
DDexMetadataHelperTest.java26 import android.content.pm.PackageParser;
27 import android.content.pm.PackageParser.ApkLite;
28 import android.content.pm.PackageParser.Package;
29 import android.content.pm.PackageParser.PackageLite;
30 import android.content.pm.PackageParser.PackageParserException;
104 Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */); in testParsePackageWithDmFileValid()
120 Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */); in testParsePackageSplitsWithDmFileValid()
139 Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */); in testParsePackageSplitsNoBaseWithDmFileValid()
155 PackageParser.Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */); in testParsePackageWithDmFileInvalid()
172 PackageParser.Package pkg = new PackageParser().parsePackage(mTmpDir, 0 /* flags */); in testParsePackageSplitsWithDmFileInvalid()
[all …]
/frameworks/base/core/java/android/content/pm/
DSigningInfo.java30 private final PackageParser.SigningDetails mSigningDetails;
33 mSigningDetails = PackageParser.SigningDetails.UNKNOWN; in SigningInfo()
39 public SigningInfo(PackageParser.SigningDetails signingDetails) { in SigningInfo()
40 mSigningDetails = new PackageParser.SigningDetails(signingDetails); in SigningInfo()
44 mSigningDetails = new PackageParser.SigningDetails(orig.mSigningDetails); in SigningInfo()
48 mSigningDetails = PackageParser.SigningDetails.CREATOR.createFromParcel(source); in SigningInfo()
DPackageSharedLibraryUpdater.java40 public abstract void updatePackage(PackageParser.Package pkg); in updatePackage()
42 static void removeLibrary(PackageParser.Package pkg, String libraryName) { in removeLibrary()
63 static boolean apkTargetsApiLevelLessThanOrEqualToOMR1(PackageParser.Package pkg) { in apkTargetsApiLevelLessThanOrEqualToOMR1()
78 void prefixImplicitDependency(PackageParser.Package pkg, String existingLibrary, in prefixImplicitDependency()
95 void prefixRequiredLibrary(PackageParser.Package pkg, String libraryName) { in prefixRequiredLibrary()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/backup/
DBackupUtilsTest.java30 import android.content.pm.PackageParser;
31 import android.content.pm.PackageParser.Package;
100 new PackageParser.SigningDetails( in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
102 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
120 new PackageParser.SigningDetails( in signaturesMatch_disallowsUnsignedApps_storedSignatureEmpty_returnsFalse()
122 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_disallowsUnsignedApps_storedSignatureEmpty_returnsFalse()
204 new PackageParser.SigningDetails( in signaturesMatch_equalSignatures_returnsTrue()
206 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_equalSignatures_returnsTrue()
227 new PackageParser.SigningDetails( in signaturesMatch_extraSignatureInTarget_returnsTrue()
229 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_extraSignatureInTarget_returnsTrue()
[all …]
/frameworks/base/core/java/android/content/pm/dex/
DDexMetadataHelper.java20 import static android.content.pm.PackageParser.APK_FILE_EXTENSION;
22 import android.content.pm.PackageParser;
23 import android.content.pm.PackageParser.PackageLite;
24 import android.content.pm.PackageParser.PackageParserException;
89 public static Map<String, String> getPackageDexMetadata(PackageParser.Package pkg) { in getPackageDexMetadata()
138 if (!PackageParser.isApkPath(codePath)) { in buildDexMetadataPathForApk()
153 return PackageParser.isApkFile(targetFile) in buildDexMetadataPathForFile()
163 public static void validatePackageDexMetadata(PackageParser.Package pkg) in validatePackageDexMetadata()
205 if (PackageParser.isApkPath(paths[i])) { in validateDexPaths()
/frameworks/base/core/java/android/content/pm/split/
DDefaultSplitAssetLoader.java21 import android.content.pm.PackageParser;
22 import android.content.pm.PackageParser.PackageParserException;
23 import android.content.pm.PackageParser.ParseFlags;
44 public DefaultSplitAssetLoader(PackageParser.PackageLite pkg, @ParseFlags int flags) { in DefaultSplitAssetLoader()
52 if ((flags & PackageParser.PARSE_MUST_BE_APK) != 0 && !PackageParser.isApkPath(path)) { in loadApkAssets()
DSplitAssetDependencyLoader.java22 import android.content.pm.PackageParser;
23 import android.content.pm.PackageParser.PackageParserException;
24 import android.content.pm.PackageParser.ParseFlags;
48 public SplitAssetDependencyLoader(PackageParser.PackageLite pkg, in SplitAssetDependencyLoader()
69 if ((flags & PackageParser.PARSE_MUST_BE_APK) != 0 && !PackageParser.isApkPath(path)) { in loadApkAssets()
DSplitAssetLoader.java18 import android.content.pm.PackageParser;
28 AssetManager getBaseAssetManager() throws PackageParser.PackageParserException; in getBaseAssetManager()
29 AssetManager getSplitAssetManager(int splitIdx) throws PackageParser.PackageParserException; in getSplitAssetManager()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DPackageParserTest.java25 import android.content.pm.PackageParser.Component;
26 import android.content.pm.PackageParser.Package;
27 import android.content.pm.PackageParser.Permission;
64 final int result = PackageParser.computeMinSdkVersion( in verifyComputeMinSdkVersion()
151 final int result = PackageParser.computeTargetSdkVersion( in verifyComputeTargetSdkVersion()
264 PackageParser.getActivityConfigChanges(configChanges, recreateOnConfigChanges); in testGetActivityConfigChanges()
271 PackageParser.getActivityConfigChanges(configChanges, recreateOnConfigChanges); in testGetActivityConfigChanges()
278 PackageParser.getActivityConfigChanges(configChanges, recreateOnConfigChanges); in testGetActivityConfigChanges()
283 PackageParser.getActivityConfigChanges(configChanges, recreateOnConfigChanges); in testGetActivityConfigChanges()
290 PackageParser.getActivityConfigChanges(configChanges, recreateOnConfigChanges); in testGetActivityConfigChanges()
[all …]
DPackageBuilder.java41 public PackageParser.Package build() { in build()
42 PackageParser.Package pkg = new PackageParser.Package("org.package.name"); in build()
74 public void check(PackageParser.Package pkg) { in check()
/frameworks/base/core/java/android/util/apk/
DApkSignatureVerifier.java26 import android.content.pm.PackageParser;
27 import android.content.pm.PackageParser.PackageParserException;
28 import android.content.pm.PackageParser.SigningDetails.SignatureSchemeVersion;
65 public static PackageParser.SigningDetails verify(String apkPath, in verify()
94 return new PackageParser.SigningDetails( in verify()
126 return new PackageParser.SigningDetails( in verify()
162 private static PackageParser.SigningDetails verifyV1Signature( in verifyV1Signature()
184 PackageParser.ANDROID_MANIFEST_FILENAME); in verifyV1Signature()
193 + PackageParser.ANDROID_MANIFEST_FILENAME); in verifyV1Signature()
206 if (entryName.equals(PackageParser.ANDROID_MANIFEST_FILENAME)) continue; in verifyV1Signature()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DAppBackupUtilsTest.java29 import android.content.pm.PackageParser;
401 new PackageParser.SigningDetails( in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
403 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
421 new PackageParser.SigningDetails( in signaturesMatch_disallowsUnsignedApps_storedSignatureEmpty_returnsFalse()
423 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_disallowsUnsignedApps_storedSignatureEmpty_returnsFalse()
502 new PackageParser.SigningDetails( in signaturesMatch_equalSignatures_returnsTrue()
504 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_equalSignatures_returnsTrue()
525 new PackageParser.SigningDetails( in signaturesMatch_extraSignatureInTarget_returnsTrue()
527 PackageParser.SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3, in signaturesMatch_extraSignatureInTarget_returnsTrue()
548 new PackageParser.SigningDetails( in signaturesMatch_extraSignatureInStored_returnsFalse()
[all …]
/frameworks/base/packages/DefaultContainerService/src/com/android/defcontainer/
DDefaultContainerService.java26 import android.content.pm.PackageParser;
27 import android.content.pm.PackageParser.PackageLite;
28 import android.content.pm.PackageParser.PackageParserException;
84 pkg = PackageParser.parsePackageLite(packageFile, 0);
112 final PackageParser.PackageLite pkg;
115 pkg = PackageParser.parsePackageLite(packageFile, 0);
183 final PackageParser.PackageLite pkg;
185 pkg = PackageParser.parsePackageLite(packageFile, 0);

123