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

Commit 85f1d2a7 authored by Jordan Liu's avatar Jordan Liu
Browse files

Make RadioInfo settings menu work for mSIM

Just add a spinner to the top of the screen which lets you select the
phoneIndex. Upating this value updates the mTelephonyManager
mImsManager, and mPhoneStateListener to use the selected phoneIndex and
the subscription associated with it.

Also adds fields for current subId and default data sim subId.

Due to b/117555407, the same PhoneStateListener object can not be used
to register on different subIds, so we workaround this by recreating
the PhoneStateListener when reregistering.

Test: manual test (on single sim)
Fixes: 128033739
Change-Id: I9d6631da628351511e285afeb5b6d4331aaab7e5
Merged-In: I9d6631da628351511e285afeb5b6d4331aaab7e5
parent 76ffb2df
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -25,6 +25,19 @@
        android:descendantFocusability="beforeDescendants"
        android:focusableInTouchMode="true">

        <!-- Phone index -->
        <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/phone_index_label"
                style="@style/info_label"
                />

        <Spinner android:id="@+id/phoneIndex"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                />

        <!-- IMEI -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_imei_label" style="@style/info_label" />
@@ -37,6 +50,18 @@
            <TextView android:id="@+id/number" style="@style/info_value" />
        </LinearLayout>

        <!-- Subscription ID -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_subid" style="@style/info_label" />
            <TextView android:id="@+id/subid" style="@style/info_value" />
        </LinearLayout>

        <!-- Default data subscription -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_dds" style="@style/info_label" />
            <TextView android:id="@+id/dds" style="@style/info_value" />
        </LinearLayout>

        <!-- IMSI -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_imsi_label" style="@style/info_label" />
+6 −0
Original line number Diff line number Diff line
@@ -484,6 +484,10 @@
    <!-- HTTP proxy settings. Title for Proxy-Auto Config URL.  [CHAR LIMIT=25] -->
    <string name="proxy_url_title">"PAC URL: "</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_subid">Current subId:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_dds">SubId of default data SIM:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_dl_kbps">DL Bandwidth (kbps):</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
@@ -531,6 +535,8 @@
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_data_network_type_label">Data Network Type:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="phone_index_label">Select phone index</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_set_perferred_label">Set Preferred Network Type:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_ping_hostname_v4">Ping Hostname(www.google.com) IPv4:</string>
+187 −74

File changed.

Preview size limit exceeded, changes collapsed.