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

Commit 8c29afdc authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix exception on non face-enabled devices

Test: open privacy settings page
Bug: 130327302
Change-Id: I31ba9f30bb7300bff6daea8a51ed6c4dc2a373f2
parent 72182e1f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings.security;

import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.face.FaceManager;
import android.provider.Settings;

@@ -30,8 +31,10 @@ public class LockscreenBypassPreferenceController extends TogglePreferenceContro

    public LockscreenBypassPreferenceController(Context context, String preferenceKey) {
        super(context, preferenceKey);
        if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
            mFaceManager = context.getSystemService(FaceManager.class);
        }
    }

    @Override
    public boolean isChecked() {