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

Commit af238e59 authored by Shaoxu Liu's avatar Shaoxu Liu Committed by Steve Kondik
Browse files

Add a flag to control SPN display

If the new added flag config_spn_display_control is set to true,
the SPN will not be catenated to the carrier text.

By default this flag is set to false to work as the same as
android original design. It could be enabled in data package
overlay if needed.

Change-Id: I74b8c18983b08cdb1d2cf7c6128e973927ec4f32
parent ce26ddd2
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -48,4 +48,31 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    <string name="telephony_plugin_jar_name" translatable="false"></string>
    <!--Fully qualified class name of telephony extended plugin.-->
    <string name="telephony_plugin_class_name" translatable="false"></string>
    <!-- When set to true, this config enables reading and displaying
         the contents of EF_SDN present in SIM -->
    <bool name="config_enable_displaying_sdn">false</bool>
    <!-- config for showing dial option when fdn contact is selected.
         By default feature is disabled -->
    <bool name="config_fdn_direct_dial">false</bool>
    <!-- FDN contact search is enabled-->
    <bool name="config_fdn_contact_search">false</bool>
    <!-- plmn name override enabled-->
    <bool name="config_plmn_name_override_enabled">false</bool>

    <!-- control not to show SPN in carrier text -->
    <bool name="config_spn_display_control">false</bool>

    <string name="sdn"></string>
    <string name="summary_sdn"></string>
    <string name="launch_sdn"></string>
    <!-- pdp data retry for cause 29 and 33 is disabled-->
    <bool name="config_pdp_retry_for_29_33_enabled">false</bool>
    <!--pdp data reject retry delay can be configured here -->
    <integer name="data_retry_delay">0</integer>
    <!-- pdp data reject idle timeout delay-->
    <integer name="data_retry_idle_delay">0</integer>
    <!-- pdp data reject dialog string for cause 29 and 33 -->
    <string name="data_conn_status_title"></string>
    <string name="user_authentication_failed"></string>
    <string name="service_not_subscribed"></string>
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import android.util.TimeUtils;

import com.android.internal.telephony.CommandException;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.ConfigResourceUtil;
import com.android.internal.telephony.EventLogTags;
import com.android.internal.telephony.ICarrierConfigLoader;
import com.android.internal.telephony.MccTable;
@@ -156,6 +157,8 @@ public class GsmServiceStateTracker extends ServiceStateTracker {
     */
    private Notification mNotification;

    private ConfigResourceUtil mConfigResUtil = new ConfigResourceUtil();

    /** Wake lock used while setting time of day. */
    private PowerManager.WakeLock mWakeLock;
    private static final String WAKELOCK_TAG = "ServiceStateTracker";
@@ -669,6 +672,11 @@ public class GsmServiceStateTracker extends ServiceStateTracker {
        spn = maybeUpdateHDTagForSpn(showSpn, spn);
        plmn = maybeUpdateHDTagForPlmn(showPlmn, plmn);

        if (mConfigResUtil.getBooleanValue(mPhone.getContext(), "config_spn_display_control")) {
            // Control not to show SPN.
            showSpn = false;
        }

        // Update SPN_STRINGS_UPDATED_ACTION IFF any value changes
        if (mSubId != subId ||
                showPlmn != mCurShowPlmn