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

Commit 9e489fdd authored by Taesu Lee's avatar Taesu Lee Committed by android-build-merger
Browse files

Merge "Remove unused ci parameter from SubscriptionController.init()" am: 2512a794

am: f96fc191

Change-Id: Ifaaecd19ec11fbf8f18b0ae816b6368c4bc0a6c2
parents 256342fe f96fc191
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ public class PhoneFactory {
                sUiccController = UiccController.make(context, sCommandsInterfaces);

                Rlog.i(LOG_TAG, "Creating SubscriptionController");
                SubscriptionController.init(context, sCommandsInterfaces);
                MultiSimSettingController.init(context, SubscriptionController.getInstance());
                SubscriptionController sc = SubscriptionController.init(context);
                MultiSimSettingController.init(context, sc);

                if (context.getPackageManager().hasSystemFeature(
                        PackageManager.FEATURE_TELEPHONY_EUICC)) {
@@ -226,8 +226,7 @@ public class PhoneFactory {
                Rlog.i(LOG_TAG, "Creating SubInfoRecordUpdater ");
                sSubInfoRecordUpdater = new SubscriptionInfoUpdater(
                        BackgroundThread.get().getLooper(), context, sPhones, sCommandsInterfaces);
                SubscriptionController.getInstance().updatePhonesAvailability(sPhones);

                sc.updatePhonesAvailability(sPhones);

                // Only bring up IMS if the device supports having an IMS stack.
                if (context.getPackageManager().hasSystemFeature(
@@ -257,7 +256,6 @@ public class PhoneFactory {

                ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(
                        ServiceManager.getService("telephony.registry"));
                SubscriptionController sc = SubscriptionController.getInstance();

                sSubscriptionMonitor = new SubscriptionMonitor(tr, sContext, sc, numPhones);

+4 −3
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ public class SubscriptionController extends ISub.Stub {
        }
    }

    public static SubscriptionController init(Context c, CommandsInterface[] ci) {
    public static SubscriptionController init(Context c) {
        synchronized (SubscriptionController.class) {
            if (sInstance == null) {
                sInstance = new SubscriptionController(c);
@@ -196,11 +196,12 @@ public class SubscriptionController extends ISub.Stub {
    }

    protected SubscriptionController(Context c) {
        init(c);
        internalInit(c);
        migrateImsSettings();
    }

    protected void init(Context c) {
    protected void internalInit(Context c) {

        mContext = c;
        mTelephonyManager = TelephonyManager.from(mContext);

+2 −3
Original line number Diff line number Diff line
@@ -92,14 +92,13 @@ public class SubscriptionControllerTest extends TelephonyTest {
        replaceInstance(MultiSimSettingController.class, "sInstance", null,
                mMultiSimSettingControllerMock);

        SubscriptionController.init(mContext, null);
        mSubscriptionControllerUT = SubscriptionController.getInstance();
        mSubscriptionControllerUT = SubscriptionController.init(mContext);
        mCallingPackage = mContext.getOpPackageName();

        doReturn(1).when(mProxyController).getMaxRafSupported();
        mContextFixture.putIntArrayResource(com.android.internal.R.array.sim_colors, new int[]{5});

        mSubscriptionControllerUT.getInstance().updatePhonesAvailability(new Phone[]{mPhone});
        mSubscriptionControllerUT.updatePhonesAvailability(new Phone[] {mPhone});
    }

    @After
+2 −3
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.telephony.SubscriptionInfo;

import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.ITelephonyRegistry;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
@@ -48,7 +47,7 @@ public class SubscriptionControllerMock extends SubscriptionController {
    public static SubscriptionController init(Phone phone) {
        throw new RuntimeException("not implemented");
    }
    public static SubscriptionController init(Context c, CommandsInterface[] ci) {
    public static SubscriptionController init(Context c) {
        throw new RuntimeException("not implemented");
    }
    public static SubscriptionController getInstance() {
@@ -65,7 +64,7 @@ public class SubscriptionControllerMock extends SubscriptionController {
        }
    }

    protected void init(Context c) {
    protected void internalInit(Context c) {
        mContext = c;
    }