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

Commit c02e86d0 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Add TestApi to get RTT support status"

am: f583bb52

Change-Id: Iaec0f9d035cfa657a345ee8ca25fc7d810f1d933
parents 780ba322 f583bb52
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -988,6 +988,7 @@ package android.telephony {


  public class TelephonyManager {
  public class TelephonyManager {
    method public int getCarrierIdListVersion();
    method public int getCarrierIdListVersion();
    method public boolean isRttSupported();
    method public void refreshUiccProfile();
    method public void refreshUiccProfile();
    method public void setCarrierTestOverride(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    method public void setCarrierTestOverride(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
    field public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1; // 0xffffffff
    field public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1; // 0xffffffff
+21 −0
Original line number Original line Diff line number Diff line
@@ -7393,6 +7393,27 @@ public class TelephonyManager {
        return false;
        return false;
    }
    }


    /**
     * Determines whether the device currently supports RTT (Real-time text). Based both on carrier
     * support for the feature and device firmware support.
     *
     * @return {@code true} if the device and carrier both support RTT, {@code false} otherwise.
     * @hide
     */
    @TestApi
    public boolean isRttSupported() {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.isRttSupported(mSubId);
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#isRttSupported", e);
        } catch (SecurityException e) {
            Log.e(TAG, "Permission error calling ITelephony#isWorldPhone", e);
        }
        return false;
    }
    /**
    /**
     * Whether the phone supports hearing aid compatibility.
     * Whether the phone supports hearing aid compatibility.
     *
     *
+2 −0
Original line number Original line Diff line number Diff line
@@ -1053,6 +1053,8 @@ interface ITelephony {
     */
     */
    boolean isTtyModeSupported();
    boolean isTtyModeSupported();


    boolean isRttSupported(int subscriptionId);

    /**
    /**
     * Whether the phone supports hearing aid compatibility.
     * Whether the phone supports hearing aid compatibility.
     *
     *