use of android.content.pm.VerificationParams in project android_frameworks_base by ParanoidAndroid.
the class PackageManagerService method installPackageWithVerification.
@Override
public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer, int flags, String installerPackageName, Uri verificationURI, ManifestDigest manifestDigest, ContainerEncryptionParams encryptionParams) {
VerificationParams verificationParams = new VerificationParams(verificationURI, null, null, VerificationParams.NO_UID, manifestDigest);
installPackageWithVerificationAndEncryption(packageURI, observer, flags, installerPackageName, verificationParams, encryptionParams);
}
use of android.content.pm.VerificationParams in project platform_frameworks_base by android.
the class VerificationParamsTest method testEquals_InstallerUid_Failure.
public void testEquals_InstallerUid_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), ORIGINATING_UID);
params2.setInstallerUid(INSTALLER_UID);
assertFalse(params1.equals(params2));
}
use of android.content.pm.VerificationParams in project platform_frameworks_base by android.
the class VerificationParamsTest method testHashCode_Referrer_Failure.
public void testHashCode_Referrer_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), null, ORIGINATING_UID);
assertFalse(params1.hashCode() == params2.hashCode());
}
use of android.content.pm.VerificationParams in project platform_frameworks_base by android.
the class VerificationParamsTest method testEquals_VerificationUri_Failure.
public void testEquals_VerificationUri_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse("http://a.different.uri/"), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), ORIGINATING_UID);
assertFalse(params1.equals(params2));
}
use of android.content.pm.VerificationParams in project platform_frameworks_base by android.
the class VerificationParamsTest method testHashCode_Originating_Uid_Failure.
public void testHashCode_Originating_Uid_Failure() throws Exception {
VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID);
VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), 12345);
assertFalse(params1.hashCode() == params2.hashCode());
}
Aggregations