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

Commit c056ac30 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] DO NOT MERGE Disable changing lock when device is not provisioned. am: c624deaf

Change-Id: I8b74b9105db55d8b8cdb3f7bc7b8b42ee9998de8
parents 5388f7b1 c624deaf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -130,6 +130,11 @@ public class ChooseLockGeneric extends SettingsActivity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            final Activity activity = getActivity();
            if (!Utils.isDeviceProvisioned(activity) && !canRunBeforeDeviceProvisioned()) {
                activity.finish();
                return;
            }

            mFingerprintManager =
                (FingerprintManager) getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
@@ -213,6 +218,10 @@ public class ChooseLockGeneric extends SettingsActivity {
            addHeaderView();
        }

        protected boolean canRunBeforeDeviceProvisioned() {
            return false;
        }

        protected void addHeaderView() {
            if (mForFingerprint) {
                setHeaderView(R.layout.choose_lock_generic_fingerprint_header);
+1 −1
Original line number Diff line number Diff line
@@ -621,7 +621,7 @@ public class SettingsActivity extends SettingsDrawerActivity
                // No UP affordance if we are displaying the main Dashboard
                mDisplayHomeAsUpEnabled = false;
                // Show Search affordance
                mDisplaySearch = true;
                mDisplaySearch = Utils.isDeviceProvisioned(this);
                mInitialTitleResId = R.string.dashboard_title;
                switchToFragment(DashboardContainerFragment.class.getName(), null, false, false,
                        mInitialTitleResId, mInitialTitle, false);
+5 −0
Original line number Diff line number Diff line
@@ -138,6 +138,11 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
            return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
        }

        @Override
        protected boolean canRunBeforeDeviceProvisioned() {
            return true;
        }

        /***
         * Disables preferences that are less secure than required quality and shows only secure
         * screen lock options here.