List of usage examples for android.content.pm VerifierInfo VerifierInfo
@UnsupportedAppUsage
public VerifierInfo(String packageName, PublicKey publicKey)
From source file:android.content.pm.PackageParser.java
private static VerifierInfo parseVerifier(Resources res, XmlPullParser parser, AttributeSet attrs, int flags) { final TypedArray sa = res.obtainAttributes(attrs, com.android.internal.R.styleable.AndroidManifestPackageVerifier); final String packageName = sa .getNonResourceString(com.android.internal.R.styleable.AndroidManifestPackageVerifier_name); final String encodedPublicKey = sa .getNonResourceString(com.android.internal.R.styleable.AndroidManifestPackageVerifier_publicKey); sa.recycle();// ww w. j a v a2s . c o m if (packageName == null || packageName.length() == 0) { Slog.i(TAG, "verifier package name was null; skipping"); return null; } final PublicKey publicKey = parsePublicKey(encodedPublicKey); if (publicKey == null) { Slog.i(TAG, "Unable to parse verifier public key for " + packageName); return null; } return new VerifierInfo(packageName, publicKey); }