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

Commit f118a6ec authored by Legler Wu's avatar Legler Wu Committed by Android Git Automerger
Browse files

am e70617d8: [DS] Correct the access method for telephony system property

* commit 'e70617d8':
  [DS] Correct the access method for telephony system property
parents 8409032e e70617d8
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -776,7 +776,7 @@ public class SmsMessage {
        String gid;
        String gid;
        final long identity = Binder.clearCallingIdentity();
        final long identity = Binder.clearCallingIdentity();
        try {
        try {
            simOperator = TelephonyManager.getDefault().getSimOperator();
            simOperator = TelephonyManager.getDefault().getSimOperatorNumeric();
            gid = TelephonyManager.getDefault().getGroupIdLevel1();
            gid = TelephonyManager.getDefault().getGroupIdLevel1();
        } finally {
        } finally {
            Binder.restoreCallingIdentity(identity);
            Binder.restoreCallingIdentity(identity);
@@ -806,11 +806,12 @@ public class SmsMessage {
        String gid;
        String gid;
        final long identity = Binder.clearCallingIdentity();
        final long identity = Binder.clearCallingIdentity();
        try {
        try {
            simOperator = TelephonyManager.getDefault().getSimOperator();
            simOperator = TelephonyManager.getDefault().getSimOperatorNumeric();
            gid = TelephonyManager.getDefault().getGroupIdLevel1();
            gid = TelephonyManager.getDefault().getGroupIdLevel1();
        } finally {
        } finally {
            Binder.restoreCallingIdentity(identity);
            Binder.restoreCallingIdentity(identity);
        }
        }

        for (NoEmsSupportConfig currentConfig : mNoEmsSupportConfigList) {
        for (NoEmsSupportConfig currentConfig : mNoEmsSupportConfigList) {
            if (simOperator.startsWith(currentConfig.mOperatorNumber) &&
            if (simOperator.startsWith(currentConfig.mOperatorNumber) &&
                (TextUtils.isEmpty(currentConfig.mGid1) ||
                (TextUtils.isEmpty(currentConfig.mGid1) ||
+0 −1
Original line number Original line Diff line number Diff line
@@ -27,7 +27,6 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.text.TextUtils;
import android.telephony.Rlog;
import android.telephony.Rlog;


+2 −2
Original line number Original line Diff line number Diff line
@@ -206,8 +206,8 @@ public abstract class InboundSmsHandler extends StateMachine {


        boolean smsCapable = mContext.getResources().getBoolean(
        boolean smsCapable = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_sms_capable);
                com.android.internal.R.bool.config_sms_capable);
        mSmsReceiveDisabled = !SystemProperties.getBoolean(
        mSmsReceiveDisabled = !TelephonyManager.from(mContext).getSmsReceiveCapableForPhone(
                TelephonyProperties.PROPERTY_SMS_RECEIVE, smsCapable);
                mPhone.getPhoneId(), smsCapable);


        PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
        PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, name);
        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, name);
+1 −1
Original line number Original line Diff line number Diff line
@@ -166,7 +166,7 @@ public final class MccTable {
        if (!TextUtils.isEmpty(mccmnc)) {
        if (!TextUtils.isEmpty(mccmnc)) {
            int mcc, mnc;
            int mcc, mnc;


            String defaultMccMnc = TelephonyManager.getDefault().getSimOperator();
            String defaultMccMnc = TelephonyManager.getDefault().getSimOperatorNumeric();
            Slog.d(LOG_TAG, "updateMccMncConfiguration defaultMccMnc=" + defaultMccMnc);
            Slog.d(LOG_TAG, "updateMccMncConfiguration defaultMccMnc=" + defaultMccMnc);
            //Update mccmnc only for default subscription in case of MultiSim.
            //Update mccmnc only for default subscription in case of MultiSim.
//            if (!defaultMccMnc.equals(mccmnc)) {
//            if (!defaultMccMnc.equals(mccmnc)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -275,7 +275,7 @@ public class PhoneFactory {
        }
        }


        // Update MCC MNC device configuration information
        // Update MCC MNC device configuration information
        String defaultMccMnc = TelephonyManager.getDefault().getSimOperator(phoneId);
        String defaultMccMnc = TelephonyManager.getDefault().getSimOperatorNumericForPhone(phoneId);
        Rlog.d(LOG_TAG, "update mccmnc=" + defaultMccMnc);
        Rlog.d(LOG_TAG, "update mccmnc=" + defaultMccMnc);
        MccTable.updateMccMncConfiguration(sContext, defaultMccMnc, false);
        MccTable.updateMccMncConfiguration(sContext, defaultMccMnc, false);


Loading