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
This commit is contained in:
committed by
Joshua Mccloskey
parent
365beaebdb
commit
a96a84e256
@@ -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;
|
||||
|
Reference in New Issue
Block a user