class KeyguardFeatures {

    static int setFingerprintDisabled(
            int currentDisabledFeatures,
            boolean fingerprintDisabled) {
                int keyguardDisabledFeatures;
        if(fingerprintDisabled){
            keyguardDisabledFeatures =
                    currentDisabledFeatures | DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT;
        } else {
            keyguardDisabledFeatures =
                    currentDisabledFeatures & (~DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT);
        }
        return keyguardDisabledFeatures;
    }

}

class KeyguardFeaturesTest {

    @Test
    public void test_changeOneKeyguardFeaturesDisabled() throws Exception {

        int expected = DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS
                + DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT;
        int result = KeyguardFeatures.setFingerprintDisabled(
                DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS, true);
        assertEquals(expected, result);
    }

}