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

Commit a96a84e2 authored by joshmccloskey's avatar joshmccloskey Committed by Joshua Mccloskey
Browse files

Ensure feature is supported and enabled.

Fixes: 137285390
Test: Verified that SecuritySettings no longer crashes.
Test: Verified that this PrefenceController no longer shows up
if the device does not support it.
Test: Verified that this PreferenceController no longer
shows up when the work profile is disabled.

Change-Id: I10f015e18491b203db6f942f07034d55f620cfe5
parent 365beaeb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,11 @@ public class FaceProfileStatusPreferenceController extends FaceStatusPreferenceC

    @Override
    public int getAvailabilityStatus() {
        // Check if Face for Profile is available.
        final int isAvailable = super.getAvailabilityStatus();
        if (isAvailable != AVAILABLE) {
            return isAvailable;
        }
        // Make the profile unsearchable so the user preference controller gets highlighted
        // when searched for.
        return AVAILABLE_UNSEARCHABLE;