niap-cc/Permissions/Tester/app/src/main/java/com/android/certifications/niap/permissions/BasePermissionTester.java [153:178]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public boolean runPermissionTest(String permission, PermissionTest test) {
        boolean testPassed = true;
        // if the permission does not exist then skp the test and return immediately.
        if (!mPlatformPermissions.contains(permission)) {
            mLogger.logDebug("The permission " + permission
                    + " is not declared by the platform on this device");
            return true;
        }
        if (mDeviceApiLevel < test.mMinApiLevel) {
            mLogger.logDebug(
                    "permission " + permission + " is targeted for min API " + test.mMinApiLevel
                            + "; device API is " + mDeviceApiLevel);
            return true;
        } else if (mDeviceApiLevel > test.mMaxApiLevel) {
            mLogger.logDebug(
                    "permission " + permission + " is targeted for max API " + test.mMaxApiLevel
                            + "; device API is " + mDeviceApiLevel);
            return true;
        }

        if (test.mIsCustom) {
            test.runTest();
        } else {
            boolean permissionGranted = isPermissionGranted(permission);
            try {
                test.runTest();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



niap-cc/Permissions/Tester/app/src/main/java/com/android/certifications/niap/permissions/SignaturePermissionTester.java [3023:3048]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public boolean runPermissionTest(String permission, PermissionTest test) {
        boolean testPassed = true;
        // if the permission does not exist then skp the test and return immediately
        if (!mPlatformPermissions.contains(permission)) {
            mLogger.logDebug("The permission " + permission
                    + " is not declared by the platform on this device");
            return true;
        }
        if (mDeviceApiLevel < test.mMinApiLevel) {
            mLogger.logDebug(
                    "permission " + permission + " is targeted for min API " + test.mMinApiLevel
                            + "; device API is " + mDeviceApiLevel);
            return true;
        } else if (mDeviceApiLevel > test.mMaxApiLevel) {
            mLogger.logDebug(
                    "permission " + permission + " is targeted for max API " + test.mMaxApiLevel
                            + "; device API is " + mDeviceApiLevel);
            return true;
        }

        if (test.mIsCustom) {
            test.runTest();
        } else {
            boolean permissionGranted = isPermissionGranted(permission);
            try {
                test.runTest();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



