Search in sources :

Example 1 with ManifestDigest

use of android.content.pm.ManifestDigest in project android_frameworks_base by ParanoidAndroid.

the class VerificationParamsTest method testHashCode_OriginatingUri_Failure.

public void testHashCode_OriginatingUri_Failure() throws Exception {
    VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID, MANIFEST_DIGEST);
    VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse("http://a.different.uri/"), Uri.parse(REFERRER_STRING), ORIGINATING_UID, new ManifestDigest(DIGEST_BYTES));
    assertFalse(params1.hashCode() == params2.hashCode());
}
Also used : VerificationParams(android.content.pm.VerificationParams) ManifestDigest(android.content.pm.ManifestDigest)

Example 2 with ManifestDigest

use of android.content.pm.ManifestDigest in project android_frameworks_base by ParanoidAndroid.

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, MANIFEST_DIGEST);
    VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), 12345, new ManifestDigest(DIGEST_BYTES));
    assertFalse(params1.hashCode() == params2.hashCode());
}
Also used : VerificationParams(android.content.pm.VerificationParams) ManifestDigest(android.content.pm.ManifestDigest)

Example 3 with ManifestDigest

use of android.content.pm.ManifestDigest in project android_frameworks_base by ParanoidAndroid.

the class VerificationParamsTest method testHashCode_VerificationUri_Failure.

public void testHashCode_VerificationUri_Failure() throws Exception {
    VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID, MANIFEST_DIGEST);
    VerificationParams params2 = new VerificationParams(null, Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), ORIGINATING_UID, new ManifestDigest(DIGEST_BYTES));
    assertFalse(params1.hashCode() == params2.hashCode());
}
Also used : VerificationParams(android.content.pm.VerificationParams) ManifestDigest(android.content.pm.ManifestDigest)

Example 4 with ManifestDigest

use of android.content.pm.ManifestDigest in project android_frameworks_base by ParanoidAndroid.

the class VerificationParamsTest method testEquals_Referrer_Failure.

public void testEquals_Referrer_Failure() throws Exception {
    VerificationParams params1 = new VerificationParams(VERIFICATION_URI, ORIGINATING_URI, REFERRER, ORIGINATING_UID, MANIFEST_DIGEST);
    VerificationParams params2 = new VerificationParams(Uri.parse(VERIFICATION_URI_STRING), Uri.parse(ORIGINATING_URI_STRING), Uri.parse("http://a.different.uri/"), ORIGINATING_UID, new ManifestDigest(DIGEST_BYTES));
    assertFalse(params1.equals(params2));
}
Also used : VerificationParams(android.content.pm.VerificationParams) ManifestDigest(android.content.pm.ManifestDigest)

Example 5 with ManifestDigest

use of android.content.pm.ManifestDigest in project android_frameworks_base by ParanoidAndroid.

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, MANIFEST_DIGEST);
    VerificationParams params2 = new VerificationParams(Uri.parse("http://a.different.uri/"), Uri.parse(ORIGINATING_URI_STRING), Uri.parse(REFERRER_STRING), ORIGINATING_UID, new ManifestDigest(DIGEST_BYTES));
    assertFalse(params1.equals(params2));
}
Also used : VerificationParams(android.content.pm.VerificationParams) ManifestDigest(android.content.pm.ManifestDigest)

Aggregations

ManifestDigest (android.content.pm.ManifestDigest)14 VerificationParams (android.content.pm.VerificationParams)14