Merge "Move bypass default value to framework" into qt-r1-dev
am: 839b7183d6
Change-Id: Iecca7741001c7e4b60d8f698ef73ac0d9321b0e1
This commit is contained in:
@@ -4117,6 +4117,9 @@
|
||||
<integer-array name="config_face_acquire_vendor_biometricprompt_ignorelist" translatable="false" >
|
||||
</integer-array>
|
||||
|
||||
<!-- If face auth sends the user directly to home/last open app, or stays on keyguard -->
|
||||
<bool name="config_faceAuthDismissesKeyguard">true</bool>
|
||||
|
||||
<!-- The component name for the default profile supervisor, which can be set as a profile owner
|
||||
even after user setup is complete. The defined component should be used for supervision purposes
|
||||
only. The component must be part of a system app. -->
|
||||
|
||||
@@ -2581,6 +2581,7 @@
|
||||
<java-symbol type="array" name="config_face_acquire_vendor_keyguard_ignorelist" />
|
||||
<java-symbol type="array" name="config_face_acquire_biometricprompt_ignorelist" />
|
||||
<java-symbol type="array" name="config_face_acquire_vendor_biometricprompt_ignorelist" />
|
||||
<java-symbol type="bool" name="config_faceAuthDismissesKeyguard" />
|
||||
|
||||
<!-- Face config -->
|
||||
<java-symbol type="integer" name="config_faceMaxTemplatesPerUser" />
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
<!-- Whether or not we show the number in the bar. -->
|
||||
<bool name="config_statusBarShowNumber">false</bool>
|
||||
|
||||
<!-- If the lock screen should be dismissed after biometric auth. -->
|
||||
<bool name="config_faceAuthDismissesKeyguard">false</bool>
|
||||
|
||||
<!-- Vibrator pattern for camera gesture launch. -->
|
||||
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
|
||||
<item>0</item>
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.android.systemui.statusbar.phone
|
||||
|
||||
import android.content.Context
|
||||
import android.hardware.face.FaceManager
|
||||
import android.provider.Settings
|
||||
import com.android.internal.annotations.VisibleForTesting
|
||||
import com.android.keyguard.KeyguardUpdateMonitor
|
||||
import com.android.systemui.R
|
||||
import com.android.systemui.tuner.TunerService
|
||||
|
||||
import javax.inject.Inject
|
||||
@@ -32,8 +32,13 @@ class KeyguardBypassController {
|
||||
@Inject
|
||||
constructor(context: Context,
|
||||
tunerService: TunerService) {
|
||||
val dismissByDefault = if (context.getResources().getBoolean(
|
||||
R.bool.config_faceAuthDismissesKeyguard)) 1 else 0
|
||||
val faceManager = context.getSystemService(FaceManager::class.java)
|
||||
if (faceManager?.isHardwareDetected != true) {
|
||||
return
|
||||
}
|
||||
|
||||
val dismissByDefault = if (context.resources.getBoolean(
|
||||
com.android.internal.R.bool.config_faceAuthDismissesKeyguard)) 1 else 0
|
||||
tunerService.addTunable(
|
||||
object : TunerService.Tunable {
|
||||
override fun onTuningChanged(key: String?, newValue: String?) {
|
||||
|
||||
Reference in New Issue
Block a user