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

Commit 14dc9341 authored by Youhan Wang's avatar Youhan Wang Committed by android-build-merger
Browse files

Merge "Add getAidForApptype()." into nyc-mr1-dev am: d4ddc7bc

am: 62305f9f

* commit '62305f9f':
  Add getAidForApptype().

Change-Id: Ia953686bbfa8257cd3d876b2b838a115467ee354
parents 62f3521e 62305f9f
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -5178,4 +5178,40 @@ public class TelephonyManager {
        }
        return false;
    }

    /**
     * Return the application ID for the app type like {@link APPTYPE_CSIM}.
     *
     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
     *
     * @param appType the uicc app type like {@link APPTYPE_CSIM}
     * @return Application ID for specificied app type or null if no uicc or error.
     * @hide
     */
    public String getAidForAppType(int appType) {
        return getAidForAppType(getDefaultSubscription(), appType);
    }

    /**
     * Return the application ID for the app type like {@link APPTYPE_CSIM}.
     *
     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
     *
     * @param subId the subscription ID that this request applies to.
     * @param appType the uicc app type, like {@link APPTYPE_CSIM}
     * @return Application ID for specificied app type or null if no uicc or error.
     * @hide
     */
    public String getAidForAppType(int subId, int appType) {
        try {
            ITelephony service = getITelephony();
            if (service != null) {
                return service.getAidForAppType(subId, appType);
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#getAidForAppType", e);
        }
        return null;
    }

}
+9 −0
Original line number Diff line number Diff line
@@ -1067,4 +1067,13 @@ interface ITelephony {
     * Returns a list of packages that have carrier privileges.
     */
    List<String> getPackagesWithCarrierPrivileges();

    /**
     * Return the application ID for the app type.
     *
     * @param subId the subscription ID that this request applies to.
     * @param appType the uicc app type,
     * @return Application ID for specificied app type or null if no uicc or error.
     */
    String getAidForAppType(int subId, int appType);
}