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

Commit f56cd707 authored by Nathan Harold's avatar Nathan Harold
Browse files

Add support for querying Forbidden PLMNs

Bug: 32277497
Test: Verified via public API for: missing SIM and working SIM
Change-Id: Ib7838a4be81853ef336e4f3d527c483b49cd2167
parent 3e640036
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -4173,6 +4173,32 @@ public class TelephonyManager {
        }
    }

    /**
     * Returns an array of Forbidden PLMNs from the specified SIM App
     * Returns null if the query fails.
     *
     *
     * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
     *
     * @param subId subscription ID used for authentication
     * @param appType the icc application type, like {@link #APPTYPE_USIM}
     * @return fplmns an array of forbidden PLMNs
     * @hide
     */
    public String[] getForbiddenPlmns(int subId, int appType) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony == null)
                return null;
            return telephony.getForbiddenPlmns(subId, appType);
        } catch (RemoteException ex) {
            return null;
        } catch (NullPointerException ex) {
            // This could happen before phone starts
            return null;
        }
    }

    /**
     * Get P-CSCF address from PCO after data connection is established or modified.
     * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
+11 −0
Original line number Diff line number Diff line
@@ -1235,4 +1235,15 @@ interface ITelephony {
     * @hide
     * */
    void setSimPowerStateForSlot(int slotId, boolean powerUp);

     * Returns a list of Forbidden PLMNs from the specified SIM App
     * Returns null if the query fails.
     *
     *
     * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
     *
     * @param subId subscription ID used for authentication
     * @param appType the icc application type, like {@link #APPTYPE_USIM}
     */
    String[] getForbiddenPlmns(int subId, int appType);
}