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

Change-Id: I2539128daff8df52d040606141f772fc9edffa57
This commit is contained in:
Kevin Chyn
2017-07-20 00:15:44 -07:00
parent 5e48ea193b
commit 82792cc5b3
6 changed files with 115 additions and 25 deletions

View File

@@ -1222,6 +1222,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.