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

Commit 0d106581 authored by Jack Yu's avatar Jack Yu
Browse files

Cleaned up the phone type check

Phone type can only be GSM now after CDMA code removed. So
removing all isPhoneTypeXxx checks.

Also removed some dead codes.

BYPASS_LARGE_CHANGE_WARNING
Bug: 423974654
Test: Basic telephony functionality tests
Flag: EXEMPT dead code removal

Change-Id: I9195c7f394c4742a3ce26caf763f9fbc862afaea
parent 7f6cae48
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -83,8 +83,6 @@ public abstract class BaseCommands implements CommandsInterface {
    @UnsupportedAppUsage
    protected RegistrantList mResendIncallMuteRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mCdmaSubscriptionChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mExitEmergencyCallbackModeRegistrants = new RegistrantList();
    protected RegistrantList mRilConnectedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
@@ -173,8 +171,6 @@ public abstract class BaseCommands implements CommandsInterface {
    // vendor ril so it starts up in the correct mode.
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    protected int mAllowedNetworkTypesBitmask;
    // CDMA subscription received from PhoneFactory
    protected int mCdmaSubscription;
    // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone.
    @UnsupportedAppUsage
    protected int mPhoneType;
@@ -758,16 +754,6 @@ public abstract class BaseCommands implements CommandsInterface {
        mResendIncallMuteRegistrants.remove(h);
    }

    @Override
    public void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj) {
        mCdmaSubscriptionChangedRegistrants.addUnique(h, what, obj);
    }

    @Override
    public void unregisterForCdmaSubscriptionChanged(Handler h) {
        mCdmaSubscriptionChangedRegistrants.remove(h);
    }

    @Override
    public void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj) {
        mExitEmergencyCallbackModeRegistrants.addUnique(h, what, obj);
+0 −4
Original line number Diff line number Diff line
@@ -123,10 +123,6 @@ public class CarrierActionAgent extends Handler {
                log("SET_METERED_APNS_ENABLED: " + mCarrierActionOnMeteredApnEnabled);
                mMeteredApnEnabledLog.log("SET_METERED_APNS_ENABLED: "
                        + mCarrierActionOnMeteredApnEnabled);
                int otaspState = (mCarrierActionOnMeteredApnEnabled)
                        ? mPhone.getServiceStateTracker().getOtasp()
                        : TelephonyManager.OTASP_SIM_UNPROVISIONED;
                mPhone.notifyOtaspChanged(otaspState);
                mMeteredApnEnableRegistrants.notifyRegistrants(
                        new AsyncResult(null, mCarrierActionOnMeteredApnEnabled, null));
                break;
+0 −44
Original line number Diff line number Diff line
@@ -662,17 +662,6 @@ public interface CommandsInterface {
    void registerForResendIncallMute(Handler h, int what, Object obj);
    void unregisterForResendIncallMute(Handler h);

    /**
     * Registers the handler for when Cdma subscription changed events
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     *
     */
    void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj);
    void unregisterForCdmaSubscriptionChanged(Handler h);

    /**
     * Registers the handler for when Cdma prl changed events
     *
@@ -1733,26 +1722,6 @@ public interface CommandsInterface {

    public void registerForImeiMappingChanged(Handler h, int what, Object obj);

    /**
     * Request the device MDN / H_SID / H_NID / MIN.
     * "response" is const char **
     *   [0] is MDN if CDMA subscription is available
     *   [1] is a comma separated list of H_SID (Home SID) in decimal format
     *       if CDMA subscription is available
     *   [2] is a comma separated list of H_NID (Home NID) in decimal format
     *       if CDMA subscription is available
     *   [3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
     */
    @UnsupportedAppUsage
    public void getCDMASubscription(Message response);

    /**
     * Send Flash Code.
     * "response" is is NULL
     *   [0] is a FLASH string
     */
    public void sendCDMAFeatureCode(String FeatureCode, Message response);

    /** Set the Phone type created */
    @UnsupportedAppUsage
    void setPhoneType(int phoneType);
@@ -1771,19 +1740,6 @@ public interface CommandsInterface {
     */
    void setCdmaRoamingPreference(int cdmaRoamingType, Message response);

    /**
     *  Requests to set the CDMA subscription mode
     * @param cdmaSubscriptionType one of  CDMA_SUBSCRIPTION_*
     * @param response is callback message
     */
    void setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response);

    /**
     *  Requests to get the CDMA subscription srouce
     * @param response is callback message
     */
    void getCdmaSubscriptionSource(Message response);

    /**
     *  Set the TTY mode
     *
Loading