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

Commit c43a7b99 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix Settings crash"

parents 5a871b8c a99a85fd
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -113,9 +113,17 @@ public class FaceSettings extends DashboardFragment {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final Context context = getPrefContext();
        mUserManager = context.getSystemService(UserManager.class);
        mFaceManager = context.getSystemService(FaceManager.class);
        mToken = getIntent().getByteArrayExtra(KEY_TOKEN);
        mUserManager = getPrefContext().getSystemService(UserManager.class);
        mFaceManager = getPrefContext().getSystemService(FaceManager.class);

        if (!isAvailable(context)) {
            Log.w(TAG, "no faceManager, finish this");
            finish();
            return;
        }

        mUserId = getActivity().getIntent().getIntExtra(
                Intent.EXTRA_USER_ID, UserHandle.myUserId());