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

Commit 0cf4b000 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topics "KEY_DATA_SWITCH_VALIDATION_MIN_GAP_MILLIS_LONG", "smsvc_bootup"

* changes:
  Added SIM events handling and fix crashes
  Update CellularNetworkValidator with new carrier config key
parents bd35a1b6 43b777f3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -212,9 +212,14 @@ public class PhoneFactory {
                    TelephonyComponentFactory.getInstance().inject(SubscriptionController.class
                            .getName()).initSubscriptionController(context);
                }

                SubscriptionController sc = null;
                if (!isSubscriptionManagerServiceEnabled()) {
                    sc = SubscriptionController.getInstance();
                }

                TelephonyComponentFactory.getInstance().inject(MultiSimSettingController.class.
                        getName()).initMultiSimSettingController(context,
                        SubscriptionController.getInstance());
                        getName()).initMultiSimSettingController(context, sc);

                if (context.getPackageManager().hasSystemFeature(
                        PackageManager.FEATURE_TELEPHONY_EUICC)) {
+2 −2
Original line number Diff line number Diff line
@@ -2769,8 +2769,8 @@ public class ServiceStateTracker extends Handler {

            if (mPhone.isSubscriptionManagerServiceEnabled()) {
                mSubscriptionManagerService.setCarrierName(mPhone.getSubId(),
                        getCarrierName(data.shouldShowPlmn(), data.getPlmn(),
                                data.shouldShowSpn(), data.getSpn()));
                        TextUtils.emptyIfNull(getCarrierName(data.shouldShowPlmn(), data.getPlmn(),
                                data.shouldShowSpn(), data.getSpn())));
            } else {
                if (!mSubscriptionController.setPlmnSpn(mPhone.getPhoneId(),
                        data.shouldShowPlmn(), data.getPlmn(), data.shouldShowSpn(),
+4 −1
Original line number Diff line number Diff line
@@ -329,6 +329,9 @@ public class SubscriptionController extends ISub.Stub {

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public static SubscriptionController getInstance() {
        if (PhoneFactory.isSubscriptionManagerServiceEnabled()) {
            throw new RuntimeException("getInstance should not be called.");
        }
        if (sInstance == null) {
            Log.wtf(LOG_TAG, "getInstance null");
        }
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.internal.telephony.data;

import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
import static android.telephony.CarrierConfigManager.KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG;
import static android.telephony.CarrierConfigManager.KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG;
import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS;

import android.content.Context;
@@ -202,7 +202,7 @@ public class CellularNetworkValidator {
            if (configManager != null) {
                PersistableBundle b = configManager.getConfigForSubId(subId);
                if (b != null) {
                    ttl = b.getLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG);
                    ttl = b.getLong(KEY_DATA_SWITCH_VALIDATION_MIN_INTERVAL_MILLIS_LONG);
                }
            }
            // Ttl can't be bigger than one day for now.
+8 −2
Original line number Diff line number Diff line
@@ -531,8 +531,14 @@ public class PhoneSwitcher extends Handler {
        mMaxDataAttachModemCount = maxActivePhones;
        mLocalLog = new LocalLog(MAX_LOCAL_LOG_LINES);

        mSubscriptionController = SubscriptionController.getInstance();
        if (PhoneFactory.isSubscriptionManagerServiceEnabled()) {
            mSubscriptionManagerService = SubscriptionManagerService.getInstance();
            mSubscriptionController = null;
        } else {
            mSubscriptionController = SubscriptionController.getInstance();
            mSubscriptionManagerService = null;
        }

        mRadioConfig = RadioConfig.getInstance();
        mValidator = CellularNetworkValidator.getInstance();

Loading