Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9178,6 +9178,7 @@ package android.telephony { method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method public boolean isCurrentSimOperator(@NonNull String, int, @Nullable String); method public boolean isDataConnectivityPossible(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled(); telephony/java/android/telephony/TelephonyManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ import android.telephony.Annotation.SimActivationState; import android.telephony.Annotation.UiccAppType; import android.telephony.VisualVoicemailService.VisualVoicemailTask; import android.telephony.data.ApnSetting; import android.telephony.data.ApnSetting.MvnoType; import android.telephony.emergency.EmergencyNumber; import android.telephony.emergency.EmergencyNumber.EmergencyServiceCategories; import android.telephony.ims.ImsMmTelManager; Loading Loading @@ -11904,6 +11905,37 @@ public class TelephonyManager { return true; } /** * Verifies whether the input MCC/MNC and MVNO correspond to the current carrier. * * @param mccmnc the carrier's mccmnc that you want to match * @param mvnoType the mvnoType that defined in {@link ApnSetting} * @param mvnoMatchData the MVNO match data * @return {@code true} if input mccmnc and mvno matches with data from sim operator. * {@code false} otherwise. * * {@hide} */ @SystemApi public boolean isCurrentSimOperator(@NonNull String mccmnc, @MvnoType int mvnoType, @Nullable String mvnoMatchData) { try { if (!mccmnc.equals(getSimOperator())) { Log.d(TAG, "The mccmnc does not match"); return false; } ITelephony service = getITelephony(); if (service != null) { return service.isMvnoMatched(getSubId(), mvnoType, mvnoMatchData); } } catch (RemoteException ex) { if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } return false; } /** * Set allowing mobile data during voice call. * Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -2088,6 +2088,8 @@ interface ITelephony { boolean isApnMetered(int apnType, int subId); boolean isMvnoMatched(int subId, int mvnoType, String mvnoMatchData); /** * Enqueue a pending sms Consumer, which will answer with the user specified selection for an * outgoing SmsManager operation. Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9178,6 +9178,7 @@ package android.telephony { method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method public boolean isCurrentSimOperator(@NonNull String, int, @Nullable String); method public boolean isDataConnectivityPossible(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled();
telephony/java/android/telephony/TelephonyManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ import android.telephony.Annotation.SimActivationState; import android.telephony.Annotation.UiccAppType; import android.telephony.VisualVoicemailService.VisualVoicemailTask; import android.telephony.data.ApnSetting; import android.telephony.data.ApnSetting.MvnoType; import android.telephony.emergency.EmergencyNumber; import android.telephony.emergency.EmergencyNumber.EmergencyServiceCategories; import android.telephony.ims.ImsMmTelManager; Loading Loading @@ -11904,6 +11905,37 @@ public class TelephonyManager { return true; } /** * Verifies whether the input MCC/MNC and MVNO correspond to the current carrier. * * @param mccmnc the carrier's mccmnc that you want to match * @param mvnoType the mvnoType that defined in {@link ApnSetting} * @param mvnoMatchData the MVNO match data * @return {@code true} if input mccmnc and mvno matches with data from sim operator. * {@code false} otherwise. * * {@hide} */ @SystemApi public boolean isCurrentSimOperator(@NonNull String mccmnc, @MvnoType int mvnoType, @Nullable String mvnoMatchData) { try { if (!mccmnc.equals(getSimOperator())) { Log.d(TAG, "The mccmnc does not match"); return false; } ITelephony service = getITelephony(); if (service != null) { return service.isMvnoMatched(getSubId(), mvnoType, mvnoMatchData); } } catch (RemoteException ex) { if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } return false; } /** * Set allowing mobile data during voice call. * Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -2088,6 +2088,8 @@ interface ITelephony { boolean isApnMetered(int apnType, int subId); boolean isMvnoMatched(int subId, int mvnoType, String mvnoMatchData); /** * Enqueue a pending sms Consumer, which will answer with the user specified selection for an * outgoing SmsManager operation. Loading