Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 509f1c79 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge changes from topic "sunfish-udfps"

* changes:
  Add anti burn-in logic for UdfpsView
  Update Fingerprint21, add Fingerprint21UdfpsMock
parents 9fd6be5d c3a18331
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -25,4 +25,7 @@ oneway interface IUdfpsOverlayController {

    // Hides the overlay.
    void hideUdfpsOverlay();

    // Shows debug messages on the UDFPS overlay.
    void setDebugMessage(String message);
}
+2 −0
Original line number Diff line number Diff line
@@ -4189,6 +4189,8 @@
    <string-array name="config_biometric_sensors" translatable="false" >
        <!-- <item>0:2:15</item>  ID0:Fingerprint:Strong -->
    </string-array>
    <!--If true, allows the device to load udfps components on older HIDL implementations -->
    <bool name="allow_test_udfps" translatable="false" >false</bool>

    <!-- Messages that should not be shown to the user during face auth enrollment. This should be
         used to hide messages that may be too chatty or messages that the user can't do much about.
+1 −0
Original line number Diff line number Diff line
@@ -2506,6 +2506,7 @@
  <java-symbol type="string" name="face_error_security_update_required" />

  <java-symbol type="array" name="config_biometric_sensors" />
  <java-symbol type="bool" name="allow_test_udfps" />

  <java-symbol type="array" name="config_face_acquire_enroll_ignorelist" />
  <java-symbol type="array" name="config_face_acquire_vendor_enroll_ignorelist" />
+5 −0
Original line number Diff line number Diff line
@@ -1036,6 +1036,11 @@
    <!-- The maximum offset in either direction that icons move to prevent burn-in on AOD. -->
    <dimen name="default_burn_in_prevention_offset">15dp</dimen>

    <!-- The maximum offset for the under-display fingerprint sensor (UDFPS) icon in either
         direction that elements aer moved to prevent burn-in on AOD-->
    <dimen name="udfps_burn_in_offset_x">8dp</dimen>
    <dimen name="udfps_burn_in_offset_y">8dp</dimen>

    <dimen name="corner_size">8dp</dimen>
    <dimen name="top_padding">0dp</dimen>
    <dimen name="bottom_padding">48dp</dimen>
+20 −6
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.SomeArgs;
import com.android.systemui.SystemUI;
import com.android.systemui.doze.DozeReceiver;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.CommandQueue;

import java.util.List;
@@ -62,12 +64,13 @@ import javax.inject.Singleton;
 */
@Singleton
public class AuthController extends SystemUI implements CommandQueue.Callbacks,
        AuthDialogCallback {
        AuthDialogCallback, DozeReceiver {

    private static final String TAG = "BiometricPrompt/AuthController";
    private static final String TAG = "AuthController";
    private static final boolean DEBUG = true;

    private final CommandQueue mCommandQueue;
    private final StatusBarStateController mStatusBarStateController;
    private final Injector mInjector;

    // TODO: These should just be saved from onSaveState
@@ -77,6 +80,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,

    private Handler mHandler = new Handler(Looper.getMainLooper());
    private WindowManager mWindowManager;
    @Nullable
    private UdfpsController mUdfpsController;
    @VisibleForTesting
    IActivityTaskManager mActivityTaskManager;
@@ -142,6 +146,13 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,
        }
    };

    @Override
    public void dozeTimeTick() {
        if (mUdfpsController != null) {
            mUdfpsController.dozeTimeTick();
        }
    }

    @Override
    public void onTryAgainPressed() {
        if (mReceiver == null) {
@@ -251,14 +262,17 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,
    }

    @Inject
    public AuthController(Context context, CommandQueue commandQueue) {
        this(context, commandQueue, new Injector());
    public AuthController(Context context, CommandQueue commandQueue,
            StatusBarStateController statusBarStateController) {
        this(context, commandQueue, statusBarStateController, new Injector());
    }

    @VisibleForTesting
    AuthController(Context context, CommandQueue commandQueue, Injector injector) {
    AuthController(Context context, CommandQueue commandQueue,
            StatusBarStateController statusBarStateController, Injector injector) {
        super(context);
        mCommandQueue = commandQueue;
        mStatusBarStateController = statusBarStateController;
        mInjector = injector;

        IntentFilter filter = new IntentFilter();
@@ -280,7 +294,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,
                    fpm.getSensorProperties();
            for (FingerprintSensorProperties props : fingerprintSensorProperties) {
                if (props.sensorType == FingerprintSensorProperties.TYPE_UDFPS) {
                    mUdfpsController = new UdfpsController(mContext);
                    mUdfpsController = new UdfpsController(mContext, mStatusBarStateController);
                    break;
                }
            }
Loading