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

Commit fc3343d2 authored by TheScarastic's avatar TheScarastic Committed by LuK1337
Browse files

udfps: Allow to configure hbm overlay type

 * Local HBM does not shows pressed icon
 * Global hbm shows pressed icon

Change-Id: Ic9f51a33c1781527f0c7fc41e8bfe320bf2653d2
parent e3edf35b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,12 @@
    <!-- Color of the UDFPS pressed view -->
    <color name="config_udfpsColor">#ffffffff</color>

    <!-- HBM type of UDFPS overlay.
            0 - GLOBAL HBM
            1 - LOCAL HBM
    -->
    <integer name="config_udfpsHbmType">1</integer>

    <!-- Udfps HBM provider class name -->
    <string name="config_udfpsHbmProviderComponent">com.android.systemui.biometrics.DummyUdfpsHbmProvider</string>
</resources>
+4 −3
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin

    private static final String SETTING_HBM_TYPE =
            "com.android.systemui.biometrics.UdfpsSurfaceView.hbmType";
    private static final @HbmType int DEFAULT_HBM_TYPE = UdfpsHbmTypes.LOCAL_HBM;

    private static final int DEBUG_TEXT_SIZE_PX = 32;

@@ -98,9 +97,11 @@ public class UdfpsView extends FrameLayout implements DozeReceiver, UdfpsIllumin

        if (Build.IS_ENG || Build.IS_USERDEBUG) {
            mHbmType = Settings.Secure.getIntForUser(mContext.getContentResolver(),
                    SETTING_HBM_TYPE, DEFAULT_HBM_TYPE, UserHandle.USER_CURRENT);
                    SETTING_HBM_TYPE,
                    mContext.getResources().getInteger(R.integer.config_udfpsHbmType),
                    UserHandle.USER_CURRENT);
        } else {
            mHbmType = DEFAULT_HBM_TYPE;
            mHbmType = mContext.getResources().getInteger(R.integer.config_udfpsHbmType);
        }
    }