Merge "Move bypass default value to framework" into qt-r1-dev
This commit is contained in:
@@ -4117,6 +4117,9 @@
|
|||||||
<integer-array name="config_face_acquire_vendor_biometricprompt_ignorelist" translatable="false" >
|
<integer-array name="config_face_acquire_vendor_biometricprompt_ignorelist" translatable="false" >
|
||||||
</integer-array>
|
</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
|
<!-- 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
|
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. -->
|
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_vendor_keyguard_ignorelist" />
|
||||||
<java-symbol type="array" name="config_face_acquire_biometricprompt_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="array" name="config_face_acquire_vendor_biometricprompt_ignorelist" />
|
||||||
|
<java-symbol type="bool" name="config_faceAuthDismissesKeyguard" />
|
||||||
|
|
||||||
<!-- Face config -->
|
<!-- Face config -->
|
||||||
<java-symbol type="integer" name="config_faceMaxTemplatesPerUser" />
|
<java-symbol type="integer" name="config_faceMaxTemplatesPerUser" />
|
||||||
|
|||||||
@@ -40,9 +40,6 @@
|
|||||||
<!-- Whether or not we show the number in the bar. -->
|
<!-- Whether or not we show the number in the bar. -->
|
||||||
<bool name="config_statusBarShowNumber">false</bool>
|
<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. -->
|
<!-- Vibrator pattern for camera gesture launch. -->
|
||||||
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
|
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
package com.android.systemui.statusbar.phone
|
package com.android.systemui.statusbar.phone
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.hardware.face.FaceManager
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import com.android.internal.annotations.VisibleForTesting
|
import com.android.internal.annotations.VisibleForTesting
|
||||||
import com.android.keyguard.KeyguardUpdateMonitor
|
import com.android.keyguard.KeyguardUpdateMonitor
|
||||||
import com.android.systemui.R
|
|
||||||
import com.android.systemui.tuner.TunerService
|
import com.android.systemui.tuner.TunerService
|
||||||
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@@ -32,8 +32,13 @@ class KeyguardBypassController {
|
|||||||
@Inject
|
@Inject
|
||||||
constructor(context: Context,
|
constructor(context: Context,
|
||||||
tunerService: TunerService) {
|
tunerService: TunerService) {
|
||||||
val dismissByDefault = if (context.getResources().getBoolean(
|
val faceManager = context.getSystemService(FaceManager::class.java)
|
||||||
R.bool.config_faceAuthDismissesKeyguard)) 1 else 0
|
if (faceManager?.isHardwareDetected != true) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val dismissByDefault = if (context.resources.getBoolean(
|
||||||
|
com.android.internal.R.bool.config_faceAuthDismissesKeyguard)) 1 else 0
|
||||||
tunerService.addTunable(
|
tunerService.addTunable(
|
||||||
object : TunerService.Tunable {
|
object : TunerService.Tunable {
|
||||||
override fun onTuningChanged(key: String?, newValue: String?) {
|
override fun onTuningChanged(key: String?, newValue: String?) {
|
||||||
|
|||||||
Reference in New Issue
Block a user