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

Commit 701ac5cb authored by Charles He's avatar Charles He
Browse files

Disable incorrect strong auth prompt strings.

The prompt strings on the confirm credentials screen (pin, password,
pattern) are incorrect. They currently say strong auth is "required
after device restarts". But instead they should be "required for
additional security" because strong auth can be enforced not only after
device or profile restarts, but also after profile key eviction, for
example.

Unfortunately, we've already missed the window for string changes.
Therefore, as an alternative, we use generic prompt strings in this CL,
to avoid conveying the incorrect (and misleading) information. We'll
follow up with another CL in master with a proper string change to fix
the issue.

Bug: 36511626
Test: manual
Test: make SettingsRoboTests
Change-Id: I44f84420b88bb4933ad0afa6e8032af465de0cd3
parent 5837a9b9
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -53,15 +53,16 @@ import java.util.ArrayList;
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {

    // The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
    // TODO(b/36511626): add back special strings for strong auth.
    private static final int[] DETAIL_TEXTS = new int[] {
        R.string.lockpassword_confirm_your_pin_generic,
        R.string.lockpassword_confirm_your_password_generic,
        R.string.lockpassword_confirm_your_pin_generic_profile,
        R.string.lockpassword_confirm_your_password_generic_profile,
        R.string.lockpassword_strong_auth_required_reason_restart_device_pin,
        R.string.lockpassword_strong_auth_required_reason_restart_device_password,
        R.string.lockpassword_strong_auth_required_reason_restart_work_pin,
        R.string.lockpassword_strong_auth_required_reason_restart_work_password,
        R.string.lockpassword_confirm_your_pin_generic,
        R.string.lockpassword_confirm_your_password_generic,
        R.string.lockpassword_confirm_your_pin_generic_profile,
        R.string.lockpassword_confirm_your_password_generic_profile,
    };

    public static class InternalActivity extends ConfirmLockPassword {
+3 −7
Original line number Diff line number Diff line
@@ -243,15 +243,11 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
        }

        private int getDefaultDetails() {
            boolean isStrongAuthRequired = isStrongAuthRequired();
            // TODO(b/36511626): add back special strings for strong auth.
            if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
                return isStrongAuthRequired
                        ? R.string.lockpassword_strong_auth_required_reason_restart_work_pattern
                        : R.string.lockpassword_confirm_your_pattern_generic_profile;
                return R.string.lockpassword_confirm_your_pattern_generic_profile;
            } else {
                return isStrongAuthRequired
                        ? R.string.lockpassword_strong_auth_required_reason_restart_device_pattern
                        : R.string.lockpassword_confirm_your_pattern_generic;
                return R.string.lockpassword_confirm_your_pattern_generic;
            }
        }