Check PackageManager before getting system service
Fixes: 131285189
Test: manual
Change-Id: I17f4db85afc5969c58a0a08667ef05786302712b
(cherry picked from commit acc340d615)
This commit is contained in:
committed by
android-build-team Robot
parent
1266e9ed85
commit
8db50b7e36
@@ -22,6 +22,8 @@ import android.content.Context;
|
||||
import android.hardware.face.FaceManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
/**
|
||||
@@ -40,7 +42,7 @@ public class FaceSettingsAppPreferenceController extends FaceSettingsPreferenceC
|
||||
|
||||
public FaceSettingsAppPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mFaceManager = context.getSystemService(FaceManager.class);
|
||||
mFaceManager = Utils.getFaceManagerOrNull(context);
|
||||
}
|
||||
|
||||
public FaceSettingsAppPreferenceController(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user