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

Commit c97b4ba2 authored by Jack Yu's avatar Jack Yu
Browse files

Remove legacy subscription code

Removed SubscriptionController and SubscriptionInfoUpdater, which
have been replaced by SubscriptionManagerService.

Test: atest FrameworksTelephonyTests

Test: Basic phone functionality tests
Fix: 276816827

Change-Id: Ia00b3d6206c60247c7f642bb720bdd8c5ea26af2
parent 8d28545a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -17,12 +17,6 @@ tjstuart@google.com
tnd@google.com
xiaotonj@google.com

# Temporarily reduced the owner during refactoring
per-file SubscriptionController.java=set noparent
per-file SubscriptionController.java=jackyu@google.com,amruthr@google.com
per-file SubscriptionInfoUpdater.java=set noparent
per-file SubscriptionInfoUpdater.java=jackyu@google.com,amruthr@google.com



+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ We define several AIDL interfaces in frameworks/base/telephony/ which we
implement in this directory and packages/services/Telephony. This IPC scheme
allows us to run public API code in the calling process, while the
telephony-related code runs in the privileged com.android.phone process. Such
implementations include PhoneInterfaceManager, SubscriptionController and
implementations include PhoneInterfaceManager, SubscriptionManagerService and
others.

The declaration of the com.android.phone process is in
+3 −8
Original line number Diff line number Diff line
@@ -193,14 +193,14 @@ public class CarrierResolver extends Handler {
    }

    /**
     * This is triggered from SubscriptionInfoUpdater after sim state change.
     * This is triggered from UiccController after sim state change.
     * The sequence of sim loading would be
     *  1. OnSubscriptionsChangedListener
     *  2. ACTION_SIM_STATE_CHANGED/ACTION_SIM_CARD_STATE_CHANGED
     *  /ACTION_SIM_APPLICATION_STATE_CHANGED
     *  3. ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED
     *
     *  For SIM refresh either reset or init refresh type, SubscriptionInfoUpdater will re-trigger
     *  For SIM refresh either reset or init refresh type, UiccController will re-trigger
     *  carrier identification with sim loaded state. Framework today silently handle single file
     *  refresh type.
     *  TODO: check fileId from single file refresh, if the refresh file is IMSI, gid1 or other
@@ -549,12 +549,7 @@ public class CarrierResolver extends Handler {
        // subscriptioninfo db to make sure we have correct carrier id set.
        if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId()) && !isSimOverride) {
            // only persist carrier id to simInfo db when subId is valid.
            if (mPhone.isSubscriptionManagerServiceEnabled()) {
                SubscriptionManagerService.getInstance().setCarrierId(mPhone.getSubId(),
                        mCarrierId);
            } else {
                SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId());
            }
            SubscriptionManagerService.getInstance().setCarrierId(mPhone.getSubId(), mCarrierId);
        }
    }

+20 −49
Original line number Diff line number Diff line
@@ -369,7 +369,6 @@ public class GsmCdmaPhone extends Phone {
        mSST.registerForVoiceRegStateOrRatChanged(this, EVENT_VRS_OR_RAT_CHANGED, null);
        mSST.getServiceStateStats().registerDataNetworkControllerCallback();

        if (isSubscriptionManagerServiceEnabled()) {
        mSubscriptionManagerService.registerCallback(new SubscriptionManagerServiceCallback(
                this::post) {
            @Override
@@ -377,10 +376,6 @@ public class GsmCdmaPhone extends Phone {
                reapplyUiccAppsEnablementIfNeeded(ENABLE_UICC_APPS_MAX_RETRIES);
            }
        });
        } else {
            SubscriptionController.getInstance().registerForUiccAppsEnabled(this,
                    EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED, null, false);
        }

        mLinkBandwidthEstimator = mTelephonyComponentFactory
                .inject(LinkBandwidthEstimator.class.getName())
@@ -493,10 +488,8 @@ public class GsmCdmaPhone extends Phone {
        mCDM = new CarrierKeyDownloadManager(this);
        mCIM = new CarrierInfoManager();

        if (isSubscriptionManagerServiceEnabled()) {
        initializeCarrierApps();
    }
    }

    private void initRatSpecific(int precisePhoneType) {
        mPendingMMIs.clear();
@@ -546,11 +539,7 @@ public class GsmCdmaPhone extends Phone {
                logd("update icc_operator_numeric=" + operatorNumeric);
                tm.setSimOperatorNumericForPhone(mPhoneId, operatorNumeric);

                if (isSubscriptionManagerServiceEnabled()) {
                mSubscriptionManagerService.setMccMnc(getSubId(), operatorNumeric);
                } else {
                    SubscriptionController.getInstance().setMccMnc(operatorNumeric, getSubId());
                }

                // Sets iso country property by retrieving from build-time system property
                String iso = "";
@@ -562,11 +551,7 @@ public class GsmCdmaPhone extends Phone {

                logd("init: set 'gsm.sim.operator.iso-country' to iso=" + iso);
                tm.setSimCountryIsoForPhone(mPhoneId, iso);
                if (isSubscriptionManagerServiceEnabled()) {
                mSubscriptionManagerService.setCountryIso(getSubId(), iso);
                } else {
                    SubscriptionController.getInstance().setCountryIso(iso, getSubId());
                }

                // Updates MCC MNC device configuration information
                logd("update mccmnc=" + operatorNumeric);
@@ -4898,18 +4883,12 @@ public class GsmCdmaPhone extends Phone {
            return;
        }

        SubscriptionInfo info;
        if (isSubscriptionManagerServiceEnabled()) {
            info = mSubscriptionManagerService
        SubscriptionInfo info = mSubscriptionManagerService
                .getAllSubInfoList(mContext.getOpPackageName(), mContext.getAttributionTag())
                .stream()
                .filter(subInfo -> subInfo.getIccId().equals(IccUtils.stripTrailingFs(iccId)))
                .findFirst()
                .orElse(null);
        } else {
            info = SubscriptionController.getInstance().getSubInfoForIccId(
                    IccUtils.stripTrailingFs(iccId));
        }

        logd("reapplyUiccAppsEnablementIfNeeded: retries=" + retries + ", subInfo=" + info);

@@ -5014,19 +4993,11 @@ public class GsmCdmaPhone extends Phone {
                config.getBoolean(CarrierConfigManager.KEY_VONR_ON_BY_DEFAULT_BOOL);

        int setting = -1;
        if (isSubscriptionManagerServiceEnabled()) {
        SubscriptionInfoInternal subInfo = mSubscriptionManagerService
                .getSubscriptionInfoInternal(getSubId());
        if (subInfo != null) {
            setting = subInfo.getNrAdvancedCallingEnabled();
        }
        } else {
            String result = SubscriptionController.getInstance().getSubscriptionProperty(
                    getSubId(), SubscriptionManager.NR_ADVANCED_CALLING_ENABLED);
            if (result != null) {
                setting = Integer.parseInt(result);
            }
        }

        logd("VoNR setting from telephony.db:"
                + setting
+108 −296

File changed.

Preview size limit exceeded, changes collapsed.

Loading