Fingerprint swipe settings and suggestions should not show if hardware unavailable
Fixes: 63589121 Test: remove FP driver, make sure swipe setting and suggestions don't show anymore && make -j RunSettingsRoboTests Merged-In: I2539128daff8df52d040606141f772fc9edffa57 Change-Id: I2539128daff8df52d040606141f772fc9edffa57
This commit is contained in:
@@ -1253,6 +1253,11 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasFingerprintHardware(Context context) {
|
||||
FingerprintManager fingerprintManager = getFingerprintManagerOrNull(context);
|
||||
return fingerprintManager != null && fingerprintManager.isHardwareDetected();
|
||||
}
|
||||
|
||||
/**
|
||||
* Launches an intent which may optionally have a user id defined.
|
||||
* @param fragment Fragment to use to launch the activity.
|
||||
|
Reference in New Issue
Block a user