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

Commit ff749b9a authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 55a2df8c: Merge "Telephony: Control operator selection using EF_CSP data."

Merge commit '55a2df8c' into gingerbread-plus-aosp

* commit '55a2df8c':
  Telephony: Control operator selection using EF_CSP data.
parents 9773cd73 55a2df8c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public interface IccConstants {
    static final int EF_SPN_CPHS = 0x6f14;
    static final int EF_SPN_SHORT_CPHS = 0x6f18;
    static final int EF_INFO_CPHS = 0x6f16;
    static final int EF_CSP_CPHS = 0x6f15;

    // CDMA RUIM file ids from 3GPP2 C.S0023-0
    static final int EF_CST = 0x6f32;
+11 −0
Original line number Diff line number Diff line
@@ -1710,4 +1710,15 @@ public interface Phone {
    void unsetOnEcbModeExitResponse(Handler h);


    /**
     * TODO: Adding a function for each property is not good.
     * A fucntion of type getPhoneProp(propType) where propType is an
     * enum of GSM+CDMA+LTE props would be a better approach.
     *
     * Get "Restriction of menu options for manual PLMN selection" bit
     * status from EF_CSP data, this belongs to "Value Added Services Group".
     * @return true if this bit is set or EF_CSP data is unavailable,
     * false otherwise
     */
    boolean isCspPlmnEnabled();
}
+15 −0
Original line number Diff line number Diff line
@@ -1018,6 +1018,13 @@ public abstract class PhoneBase extends Handler implements Phone {
        }
    }

    public boolean isCspPlmnEnabled() {
        // This function should be overridden by the class GSMPhone.
        // Not implemented in CDMAPhone.
        logUnexpectedGsmMethodCall("isCspPlmnEnabled");
        return false;
    }

    /**
     * Common error logger method for unexpected calls to CDMA-only methods.
     */
@@ -1026,4 +1033,12 @@ public abstract class PhoneBase extends Handler implements Phone {
        Log.e(LOG_TAG, "Error! " + name + "() in PhoneBase should not be " +
                "called, CDMAPhone inactive.");
    }

    /**
     * Common error logger method for unexpected calls to GSM/WCDMA-only methods.
     */
    private void logUnexpectedGsmMethodCall(String name) {
        Log.e(LOG_TAG, "Error! " + name + "() in PhoneBase should not be " +
                "called, GSMPhone inactive.");
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -839,4 +839,8 @@ public class PhoneProxy extends Handler implements Phone {
    public void unsetOnEcbModeExitResponse(Handler h){
        mActivePhone.unsetOnEcbModeExitResponse(h);
    }

    public boolean isCspPlmnEnabled() {
        return mActivePhone.isCspPlmnEnabled();
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -1486,4 +1486,7 @@ public class GSMPhone extends PhoneBase {
        Log.e(LOG_TAG, "Error! This functionality is not implemented for GSM.");
    }

    public boolean isCspPlmnEnabled() {
        return mSIMRecords.isCspPlmnEnabled();
    }
}
Loading