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

Commit f982e03c authored by Danny Baumann's avatar Danny Baumann
Browse files

Clean up SIM enable toggle implementation

- Move strings to cm_strings.xml
- Improve string wording
- Remove unused code
- Streamline implementation

Change-Id: I58fc3002cfcc37dd1798819223289cc541bed211
parent f2ad8003
Loading
Loading
Loading
Loading
+0 −41
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 /* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *     * Neither the name of The Linux Foundation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
-->

<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/sub_switch_widget"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:clickable="true"
    android:focusable="false"
    android:padding="8dip" />
+0 −2
Original line number Diff line number Diff line
@@ -3287,6 +3287,4 @@
    <string name="web_action_section_title" msgid="806405168097593614">"未安装的应用"</string>
    <string name="domain_url_section_title" msgid="7046835219056428883">"已安装的应用"</string>
    <string name="automatic_storage_manager_activation_warning" msgid="6353100011690933254">"您的存储空间目前是由存储空间管理器管理"</string>

    <string name="primary_sub_select_title">默认4G/3G SIM卡</string>
</resources>
+0 −3
Original line number Diff line number Diff line
@@ -101,9 +101,6 @@
    <!--Whether help links are defined. -->
    <bool name="config_has_help">false</bool>

    <!-- Whether to show a check box or switch for manual provision -->
    <bool name="config_custom_multi_sim_checkbox">false</bool>

    <!-- Whether notify user that switch data service -->
    <bool name="confirm_to_switch_data_service">false</bool>
</resources>
+17 −0
Original line number Diff line number Diff line
@@ -459,4 +459,21 @@
    <!-- Status bar - double tap to sleep -->
    <string name="status_bar_double_tap_to_sleep_title">Double-tap to sleep</string>
    <string name="status_bar_double_tap_to_sleep_summary">Double-tap on the status bar to turn off the display</string>

    <string name="sim_enabler_summary"><xliff:g id="displayName">%1$s</xliff:g> is <xliff:g id="status" example="disabled">%2$s</xliff:g></string>
    <string name="sim_enabled">enabled</string>
    <string name="sim_disabled">disabled</string>
    <string name="sim_missing">missing or faulty</string>
    <string name="sim_enabler_need_disable_sim">SIM card will be deactivated. Do you want to continue?</string>
    <string name="sim_enabler_will_disable_sim_title">Attention</string>
    <string name="sim_enabler_need_switch_data_service">This SIM will be disabled and SIM <xliff:g id="slotid">%1$s</xliff:g> will be used for data services. Are you sure you want to continue?</string>
    <string name="sim_enabler_airplane_on">Unable to perform the operation while airplane mode is on.</string>
    <string name="sim_enabler_in_call">Unable to perform the operation while in call.</string>
    <string name="sim_enabler_both_inactive">Can\'t disable all SIM cards</string>
    <string name="sim_enabler_enabling">Activating\u2026</string>
    <string name="sim_enabler_disabling">Deactivating\u2026</string>
    <string name="sub_activate_success">SIM activated.</string>
    <string name="sub_activate_failed">Activation failed.</string>
    <string name="sub_deactivate_success">SIM deactivated.</string>
    <string name="sub_deactivate_failed">Deactivation failed.</string>
</resources>
+0 −20
Original line number Diff line number Diff line
@@ -7927,24 +7927,4 @@
    <string name="menu_hidden_apps_reset_lock">Reset pattern lock</string>
    <string name="protected_apps">Protected apps</string>
    <string name="saving_protected_components">Saving component state</string>
    <string name="sim_enabler_summary">" is %1$s"</string>
    <string name="sim_enabled">enabled</string>
    <string name="sim_disabled">disabled</string>
    <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_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>
    <string name="sim_enabler_enabling">Activating...</string>
    <string name="sim_enabler_disabling">Deactivating...</string>
    <string name="sub_activate_success">Successfully Activated.</string>
    <string name="sub_activate_failed">Activation failed.</string>
    <string name="sub_deactivate_success">Successfully Deactivated.</string>
    <string name="sub_deactivate_failed">Deactivation failed.</string>
    <string name="primary_sub_select_title">Default 4G/3G Subscription</string>
</resources>
Loading