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

Commit 1b622b07 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...

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

Change-Id: I9c1ba2599a78d6518531a2bff2b899eecb3b6554
parents 78da2793 aaa67659
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -140,6 +140,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;
            }

            String chooseLockAction = getActivity().getIntent().getAction();
            mFingerprintManager =
@@ -217,6 +222,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
@@ -626,7 +626,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;

                // add argument to indicate which settings tab should be initially selected
+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.