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

Commit 0aae1f69 authored by mqi's avatar mqi Committed by Linux Build Service Account
Browse files

SystemUI: Add SlotId for MultiSim

Add slotId to distinguish between sim1 and sim2 in Simpinview

Change-Id: Ic353bc1712a1ab0ffa2fcc2963f7a4decf8817ff
CRs-Fixed: 956919
parent 630229b2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -278,8 +278,8 @@
    <!-- Instructions telling the user that they entered the wrong SIM PIN while trying
         to unlock the keyguard.  Displayed in a dialog box.  -->
    <plurals name="kg_password_wrong_pin_code">
        <item quantity="one">Incorrect SIM PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item>
        <item quantity="other">Incorrect SIM PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
        <item quantity="one">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item>
        <item quantity="other">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
    </plurals>

    <!-- Instructions telling the user that they have exhausted SIM PUK retries and the SIM is now unusable.
@@ -368,9 +368,9 @@

    <!-- Instructions telling the user remaining times when enter SIM PIN view.  -->
    <plurals name="kg_password_default_pin_message">
        <item quantity="one">Enter SIM PIN, you have <xliff:g id="number">%d</xliff:g> remaining
        <item quantity="one">Enter SIM<xliff:g id="slotid">%d</xliff:g> PIN, you have <xliff:g id="number">%d</xliff:g> remaining
attempt before you must contact your carrier to unlock your device.</item>
        <item quantity="other">Enter SIM PIN, you have <xliff:g id="number">%d</xliff:g> remaining
        <item quantity="other">Enter SIM<xliff:g id="slotid">%d</xliff:g> PIN, you have <xliff:g id="number">%d</xliff:g> remaining
attempts.</item>
    </plurals>

+3 −1
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
    private int mRemainingAttempts = -1;
    private AlertDialog mRemainingAttemptsDialog;
    private int mSubId;
    private int mSlotId;
    private ImageView mSimImageView;

    KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
@@ -102,7 +103,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
            msgId = isDefault ? R.plurals.kg_password_default_pin_message :
                     R.plurals.kg_password_wrong_pin_code;
            displayMessage = getContext().getResources()
                    .getQuantityString(msgId, attemptsRemaining, attemptsRemaining);
                    .getQuantityString(msgId, attemptsRemaining, mSlotId, attemptsRemaining);
        } else {
            msgId = isDefault ? R.string.kg_sim_pin_instructions : R.string.kg_password_pin_failed;
            displayMessage = getContext().getString(msgId);
@@ -324,6 +325,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
            return;
        }

        mSlotId = SubscriptionManager.getSlotId(mSubId) + 1;
        int count = TelephonyManager.getDefault().getSimCount();
        Resources rez = getResources();
        final String msg;