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

Commit 8d38c026 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8451885 from 17f93eb8 to tm-d1-release

Change-Id: I318bd7043849076c7876373d77c4eaa056d1e699
parents 63b2372f 17f93eb8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ message DataCallSession {
    optional int64 duration_minutes = 17;
    optional bool ongoing = 18;
    optional int32 band_at_end = 19;
    repeated int32 handover_failure_causes = 20;
}

message CellularServiceState {
+30 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.PersistableBundle;
import android.telephony.CarrierConfigManager;
import android.telephony.ServiceState;
import android.text.TextUtils;

import java.io.FileDescriptor;
@@ -177,8 +178,11 @@ public abstract class CallTracker extends Handler {
                phone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
        PersistableBundle bundle = configManager.getConfigForSubId(phone.getSubId());
        if (bundle != null) {
            convertMaps =
                    bundle.getStringArray(CarrierConfigManager.KEY_DIAL_STRING_REPLACE_STRING_ARRAY);
            convertMaps = (shouldPerformInternationalNumberRemapping(phone, bundle))
                    ? bundle.getStringArray(CarrierConfigManager
                            .KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY)
                    : bundle.getStringArray(CarrierConfigManager
                            .KEY_DIAL_STRING_REPLACE_STRING_ARRAY);
        }
        if (convertMaps == null) {
            // By default no replacement is necessary
@@ -233,6 +237,30 @@ public abstract class CallTracker extends Handler {

    }

    /**
     * Helper function to determine if the phones service is in ROAMING_TYPE_INTERNATIONAL.
     * @param phone object that contains the service state.
     * @param bundle object that contains the bundle with mapped dial strings.
     * @return  true if the phone is in roaming state with a set bundle. Otherwise, false.
     */
    private boolean shouldPerformInternationalNumberRemapping(Phone phone,
            PersistableBundle bundle) {
        if (phone == null || phone.getDefaultPhone() == null) {
            log("shouldPerformInternationalNumberRemapping: phone was null");
            return false;
        }

        if (bundle.getStringArray(CarrierConfigManager
                .KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY) == null) {
            log("shouldPerformInternationalNumberRemapping: did not set the "
                    + "KEY_INTERNATIONAL_ROAMING_DIAL_STRING_REPLACE_STRING_ARRAY");
            return false;
        }

        return phone.getDefaultPhone().getServiceState().getVoiceRoamingType()
                == ServiceState.ROAMING_TYPE_INTERNATIONAL;
    }

    private boolean compareGid1(Phone phone, String serviceGid1) {
        String gid1 = phone.getGroupIdLevel1();
        int gid_length = serviceGid1.length();
+11 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ public class LocaleTracker extends Handler {
                                    TelephonyManager.SIM_STATE_UNKNOWN), 0).sendToTarget();
                }
            } else if (ACTION_COUNTRY_OVERRIDE.equals(intent.getAction())) {
                // note: need to set ServiceStateTracker#PROP_FORCE_ROAMING to force roaming.
                String countryOverride = intent.getStringExtra(EXTRA_COUNTRY);
                boolean reset = intent.getBooleanExtra(EXTRA_RESET, false);
                if (reset) countryOverride = null;
@@ -654,4 +655,14 @@ public class LocaleTracker extends Handler {
        ipw.decreaseIndent();
        ipw.flush();
    }

    /**
     *  This getter should only be used for testing purposes in classes that wish to spoof the
     *  country ISO. An example of how this can be done is in ServiceStateTracker#InSameCountry
     * @return spoofed country iso.
     */
    @VisibleForTesting
    public String getCountryOverride() {
        return mCountryOverride;
    }
}
+34 −27
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
            android.hardware.radio.network.PhysicalChannelConfig[] configs) {
        mRil.processIndication(RIL.NETWORK_SERVICE, indicationType);
        List<PhysicalChannelConfig> response = new ArrayList<>(configs.length);
        try {
            for (android.hardware.radio.network.PhysicalChannelConfig config : configs) {
                PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder();
                switch (config.band.getTag()) {
@@ -169,6 +170,12 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
                        .setContextIds(config.contextIds)
                        .build());
            }
        } catch (IllegalArgumentException iae) {
            AnomalyReporter.reportAnomaly(UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
                    "RIL reported invalid PCC (AIDL)");
            mRil.riljLoge("Invalid PhysicalChannelConfig " + iae);
            return;
        }
        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response);

        mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants(
+2 −5
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.WorkSource;
import android.preference.PreferenceManager;
import android.provider.DeviceConfig;
import android.sysprop.TelephonyProperties;
import android.telecom.VideoProfile;
import android.telephony.AccessNetworkConstants;
@@ -620,10 +619,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        // Initialize SMS stats
        mSmsStats = new SmsStats(this);

        mNewDataStackEnabled = Boolean.parseBoolean(DeviceConfig.getProperty(
                DeviceConfig.NAMESPACE_TELEPHONY, "enable_new_data_stack"))
                || mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_force_enable_telephony_new_data_stack);
        mNewDataStackEnabled = !mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_force_disable_telephony_new_data_stack);

        if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
            return;
Loading