Add ActiveUnlock check when picking preference
Modify BiometricsSettingBase to also track if the hardware is supported and if the controller is a work profile controller. If the hardware is supported and active unlock is enabled, non-work profile controllers will still be displayed. Test: make RunSettingsRoboTests Test: manually flip flags on device with active unlock, confirm new layout used Bug: 264813302 Change-Id: Idb0e994453d4fd5c078c45f87d5d8cee339053a2
This commit is contained in:
@@ -25,6 +25,7 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.biometrics.BiometricStatusPreferenceController;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
import com.android.settingslib.RestrictedPreference;
|
||||
@@ -84,6 +85,11 @@ public class CombinedBiometricStatusPreferenceController extends
|
||||
return mCombinedBiometricStatusUtils.isAvailable();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isHardwareSupported() {
|
||||
return Utils.hasFaceHardware(mContext) || Utils.hasFingerprintHardware(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
|
||||
Reference in New Issue
Block a user