Always start AuthController
Since device credential is now a first-class citizen, we need to ensure
that SystemUI is always responding to authentication requests. For example,
on devices without biometrics, applications that request authentication
with Authenticators.DEVICE_CREDENTIAL is still a valid request.
Bug: 149795050
Test: Remove /vendor/etc/permissions/android.hardware.fingerprint.xml,
reboot. Go through CtsVerifier biometric section
Change-Id: I555aa5763deb31011eea46572272327f02470a02
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
index 875619a..9de018e 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -28,7 +28,6 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.hardware.biometrics.BiometricConstants;
import android.hardware.biometrics.BiometricPrompt;
@@ -238,20 +237,15 @@
@Override
public void start() {
- final PackageManager pm = mContext.getPackageManager();
- if (pm.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)
- || pm.hasSystemFeature(PackageManager.FEATURE_FACE)
- || pm.hasSystemFeature(PackageManager.FEATURE_IRIS)) {
- mCommandQueue.addCallback(this);
- mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
- mActivityTaskManager = mInjector.getActivityTaskManager();
+ mCommandQueue.addCallback(this);
+ mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
+ mActivityTaskManager = mInjector.getActivityTaskManager();
- try {
- mTaskStackListener = new BiometricTaskStackListener();
- mActivityTaskManager.registerTaskStackListener(mTaskStackListener);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to register task stack listener", e);
- }
+ try {
+ mTaskStackListener = new BiometricTaskStackListener();
+ mActivityTaskManager.registerTaskStackListener(mTaskStackListener);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Unable to register task stack listener", e);
}
}