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

Commit 839b7183 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Move bypass default value to framework" into qt-r1-dev

parents 9fae5460 1b883b48
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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. -->
+1 −0
Original line number Diff line number Diff line
@@ -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" />
+0 −3
Original line number Diff line number Diff line
@@ -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>
+8 −3
Original line number Diff line number Diff line
@@ -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?) {