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

Commit a2f5bcfd authored by Hunsuk Choi's avatar Hunsuk Choi Committed by Android (Google) Code Review
Browse files

Merge "Add a TestApi, TelephonyManager#isDomainSelectionSupported"

parents c564c8bb 9854fdc3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2684,6 +2684,7 @@ package android.telephony {
    method @NonNull public android.util.Pair<java.lang.Integer,java.lang.Integer> getHalVersion(int);
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getLine1AlphaTag();
    method @Deprecated public android.util.Pair<java.lang.Integer,java.lang.Integer> getRadioHalVersion();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDomainSelectionSupported();
    method public boolean modifyDevicePolicyOverrideApn(@NonNull android.content.Context, int, @NonNull android.telephony.data.ApnSetting);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void refreshUiccProfile();
    method @Deprecated public void setCarrierTestOverride(String, String, String, String, String, String, String);
+24 −0
Original line number Diff line number Diff line
@@ -17933,4 +17933,28 @@ public class TelephonyManager {
            ex.rethrowFromSystemServer();
        }
    }
    /**
     * Returns whether the domain selection service is supported.
     *
     * <p>Requires Permission:
     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}.
     *
     * @return {@code true} if the domain selection service is supported.
     * @hide
     */
    @TestApi
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CALLING)
    public boolean isDomainSelectionSupported() {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.isDomainSelectionSupported();
            }
        } catch (RemoteException ex) {
            Rlog.w(TAG, "RemoteException", ex);
        }
        return false;
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -2670,4 +2670,11 @@ interface ITelephony {
     */
    void setCellBroadcastIdRanges(int subId, in List<CellBroadcastIdRange> ranges,
            IIntegerConsumer callback);

    /**
     * Returns whether the domain selection service is supported.
     *
     * @return {@code true} if the domain selection service is supported.
     */
    boolean isDomainSelectionSupported();
}