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

Commit 31ebeb69 authored by Chun-Wei Wang's avatar Chun-Wei Wang
Browse files

Support alternate button

Align the behavior of frp and repair to have them
support the alternate button.

Bug: 339735656
Test: presubmit
Change-Id: Ib785db5ef16a68df4980dee451c6b638692adc5f
parent 55834fff
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
                    new ChooseLockSettingsHelper.Builder(this);
            launchedCDC = builder.setHeader(mTitle)
                    .setDescription(mDetails)
                    .setAlternateButton(alternateButton)
                    .setExternal(true)
                    .setUserId(LockPatternUtils.USER_REPAIR_MODE)
                    .show();
+2 −2
Original line number Diff line number Diff line
@@ -197,8 +197,8 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
        mCancelButton = view.findViewById(R.id.cancelButton);
        boolean showCancelButton = mRemoteValidation || getActivity().getIntent().getBooleanExtra(
                SHOW_CANCEL_BUTTON, false);
        boolean hasAlternateButton = (mFrp || mRemoteValidation) && !TextUtils.isEmpty(
                mAlternateButtonText);
        boolean hasAlternateButton = (mFrp || mRemoteValidation || mRepairMode)
                && !TextUtils.isEmpty(mAlternateButtonText);
        mCancelButton.setVisibility(showCancelButton || hasAlternateButton
                ? View.VISIBLE : View.GONE);
        if (hasAlternateButton) {