Example usage for android.content.pm PackageManager SIGNATURE_NEITHER_SIGNED

List of usage examples for android.content.pm PackageManager SIGNATURE_NEITHER_SIGNED

Introduction

In this page you can find the example usage for android.content.pm PackageManager SIGNATURE_NEITHER_SIGNED.

Prototype

int SIGNATURE_NEITHER_SIGNED

To view the source code for android.content.pm PackageManager SIGNATURE_NEITHER_SIGNED.

Click Source Link

Document

Signature check result: this is returned by #checkSignatures if neither of the two packages is signed.

Usage

From source file:com.grazerss.EntryManager.java

public final boolean isProVersion() {
    if (proVersion == null) {
        final int checkSignature = ctx.getPackageManager().checkSignatures("com.grazerss",
                EntryManager.PRO_PACKAGE_NAME);

        proVersion = (checkSignature == PackageManager.SIGNATURE_MATCH)
                || (checkSignature == PackageManager.SIGNATURE_NEITHER_SIGNED);

        if (!proVersion) {
            if ("mariano.kamp@gmail.com".equals(getEmail())
                    || "androidnewsreader@googlemail.com".equals(getEmail())
                    || "androidnewsreader@gmail.com".equals(getEmail())) {
                proVersion = true;/*from w w  w . j a  va2s . c  o m*/
            }
        }
    }
    return proVersion;
}

From source file:com.newsrob.EntryManager.java

public final boolean isProVersion() {

    if (proVersion == null) {
        final int checkSignature = ctx.getPackageManager().checkSignatures(LEGACY_PACKAGE_NAME,
                EntryManager.PRO_PACKAGE_NAME);
        proVersion = checkSignature == PackageManager.SIGNATURE_MATCH
                || checkSignature == PackageManager.SIGNATURE_NEITHER_SIGNED;
    }// www  .  j a  v a  2 s .c o m
    return proVersion;
}