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

Commit 75f676ae authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Settings: Change the tips when disable sim card."

parents 37211cf6 2c2792d7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2641,6 +2641,9 @@
    <string name="sim_disabled">已禁用</string>
    <string name="sim_missing">丢失或者错误</string>
    <string name="sim_enabler_need_disable_sim">禁用当前SIM卡,确定?</string>
    <string name="sim_enabler_will_disable_sim">禁用SIM卡,确定?</string>
    <string name="sim_enabler_will_disable_sim_title">注意</string>
    <string name="sim_enabler_need_switch_data_service">禁用SIM卡并切换到卡<xliff:g id="slotid">%1$s</xliff:g>进行数据业务,确定?</string>
    <string name="sub_deactivate_success">"禁用成功。"</string>
    <string name="sub_deactivate_failed">"禁用失败。"</string>
    <string name="sim_enabler_enabling">"启用中......"</string>
+3 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@
    <!-- Whether notify user that current connected ap is CMCC -->
    <bool name="connect_to_cmcc_notify">false</bool>

    <!-- Whether notify user that switch data service -->
    <bool name="confirm_to_switch_data_service">false</bool>

    <!-- Whether notify user in cell to wlan feature -->
    <bool name="cellular_to_wlan_hint">false</bool>
    <!-- Whether to disable cellular data -->
+3 −0
Original line number Diff line number Diff line
@@ -5312,6 +5312,9 @@
    <string name="sim_missing">missing or error</string>
    <string name="sim_enabler_need_enable_sim">Activating the SIM, are you sure?</string>
    <string name="sim_enabler_need_disable_sim">Deactivating the SIM, are you sure?</string>
    <string name="sim_enabler_will_disable_sim">Will disable it, are you sure?</string>
    <string name="sim_enabler_will_disable_sim_title">Attention</string>
    <string name="sim_enabler_need_switch_data_service">Will disable it and switch to SIM<xliff:g id="slotid">%1$s</xliff:g> for data services, are you sure?</string>
    <string name="sim_enabler_airplane_on">ERROR, airplane mode is on!</string>
    <string name="sim_enabler_in_call">ERROR, in call!</string>
    <string name="sim_enabler_both_inactive">"Error, can't disable all the SIMs"</string>
+14 −1
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class MultiSimEnablerPreference extends Preference implements OnCheckedCh
    private static final int CONFIRM_ALERT_DLG_ID = 1;
    private static final int ERROR_ALERT_DLG_ID = 2;
    private static final int RESULT_ALERT_DLG_ID = 3;
    private static final int SIM_ID[] = {1, 2};

    private int mSlotId;
    private SubInfoRecord mSir;
@@ -333,7 +334,19 @@ public class MultiSimEnablerPreference extends Preference implements OnCheckedCh
                .setTitle(title);
        switch(dialogId) {
            case CONFIRM_ALERT_DLG_ID:
                builder.setMessage(mContext.getString(R.string.sim_enabler_need_disable_sim));
                String message;
                if (mContext.getResources().getBoolean(R.bool.confirm_to_switch_data_service)) {
                    if (SubscriptionManager.getDefaultDataSubId() == mSir.subId) {
                        message = mContext.getString(R.string.sim_enabler_need_switch_data_service,
                                SIM_ID[1 - mSlotId]);
                    } else {
                        message = mContext.getString(R.string.sim_enabler_will_disable_sim);
                    }
                    builder.setTitle(R.string.sim_enabler_will_disable_sim_title);
                } else {
                    message = mContext.getString(R.string.sim_enabler_need_disable_sim);
                }
                builder.setMessage(message);
                builder.setPositiveButton(android.R.string.ok, mDialogClickListener);
                builder.setNegativeButton(android.R.string.no, mDialogClickListener);
                builder.setOnCancelListener(mDialogCanceListener);