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

Commit 8e1884a1 authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

Merge "Add check for the device having "feature face" before requesting the service" into qt-r1-dev

am: 0292861a

Change-Id: Ie6c5bd7d01cb5366d4e0af7e2616d3bc62169e83
parents 5e4d3e4e 0292861a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone

import android.content.Context
import android.content.pm.PackageManager
import android.hardware.biometrics.BiometricSourceType
import android.hardware.face.FaceManager
import android.provider.Settings
@@ -73,6 +74,9 @@ class KeyguardBypassController {
                }
            }
        })
        if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
            return
        }
        val faceManager = context.getSystemService(FaceManager::class.java)
        if (faceManager?.isHardwareDetected != true) {
            return