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

Commit b393605c authored by kaiyiz's avatar kaiyiz
Browse files

Keyguard: Add config to control whether show cancel button

By current design, when both the two SIM PINs are set, it can cancel
the first one, but have to enter the second SIM PIN code.

According to some carrier's requirement, it shouldn't show cancel
button, as it can't cancel both the two SIM PINs.
Add config to control whether show cancel button.

CRs-Fixed: 640259

Change-Id: I7b825086c5a38789cb23af15baf07c452401a853
parent f895471b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,4 +41,7 @@

    <!-- display airplane mode in lock sreen when phone is in APM mode -->
    <bool name="config_display_APM">false</bool>

    <!-- show cancel button on SIM PIN lock screen-->
    <bool name="config_show_cancel_button">false</bool>
</resources>
+8 −1
Original line number Diff line number Diff line
@@ -140,7 +140,14 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
                }
            });
        }
        if (mContext.getResources().getBoolean(R.bool.config_show_cancel_button)) {
            showCancelButton();
        } else {
            final View cancel = findViewById(R.id.key_cancel);
            if (cancel != null) {
                cancel.setVisibility(INVISIBLE);
            }
        }

        // The delete button is of the PIN keyboard itself in some (e.g. tablet) layouts,
        // not a separate view