summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheScarastic <warabhishek@gmail.com>2021-10-06 06:51:36 +0000
committeralk3pInjection <webmaster@raspii.tech>2022-05-02 09:56:20 +0800
commit3352d19bf91087ad7068d483575a6be53959ec37 (patch)
tree4191406163de1914110dcb0c7656b6aec534ea4e
parent42e5e7d4eb2b49bdd486738bfb871ace42510eb1 (diff)
udfps: Allow to configure hbm overlay type
* Local HBM does not shows pressed icon * Global hbm shows pressed icon Change-Id: Ic9f51a33c1781527f0c7fc41e8bfe320bf2653d2
-rw-r--r--packages/SystemUI/res/values/ice_config.xml6
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java7
2 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values/ice_config.xml b/packages/SystemUI/res/values/ice_config.xml
index a85c6dfedbfc..227a568dbeca 100644
--- a/packages/SystemUI/res/values/ice_config.xml
+++ b/packages/SystemUI/res/values/ice_config.xml
@@ -17,6 +17,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>
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
index 30e5aed2f8d8..e4cbb527d338 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.java
@@ -51,7 +51,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;
@@ -99,9 +98,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);
}
}