diff --git a/api/system-current.txt b/api/system-current.txt index badd31e3583a0..cb00edb1f33c6 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -43400,7 +43400,7 @@ package android.telephony { method public boolean isSmsCapable(); method public boolean isTtyModeSupported(); method public boolean isVideoCallingEnabled(); - method public boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); + method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public boolean isVoiceCapable(); method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); @@ -43418,7 +43418,7 @@ package android.telephony { method public boolean setPreferredNetworkTypeToGlobal(); method public boolean setRadio(boolean); method public boolean setRadioPower(boolean); - method public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); + method public deprecated void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); method public boolean setVoiceMailNumber(java.lang.String, java.lang.String); method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri); method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 26c9430408e8a..75155b6fa6545 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -2706,19 +2706,12 @@ public class TelephonyManager { * @param phoneAccountHandle the phone account to change the client state * @param enabled the new state of the client * @hide + * @deprecated Visual voicemail no longer in telephony. {@link VisualVoicemailService} should + * be implemented instead. */ @SystemApi public void setVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle, boolean enabled){ - try { - ITelephony telephony = getITelephony(); - if (telephony != null) { - telephony.setVisualVoicemailEnabled(mContext.getOpPackageName(), phoneAccountHandle, - enabled); - } - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - // This could happen before phone restarts due to crashing - } + } /** @@ -2730,19 +2723,11 @@ public class TelephonyManager { * @param phoneAccountHandle the phone account to check for. * @return {@code true} when the visual voicemail client is enabled for this client * @hide + * @deprecated Visual voicemail no longer in telephony. {@link VisualVoicemailService} should + * be implemented instead. */ @SystemApi public boolean isVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle){ - try { - ITelephony telephony = getITelephony(); - if (telephony != null) { - return telephony.isVisualVoicemailEnabled( - mContext.getOpPackageName(), phoneAccountHandle); - } - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - // This could happen before phone restarts due to crashing - } return false; } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index cd15c444d8bd5..60d0d80478251 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -498,12 +498,6 @@ interface ITelephony { */ boolean isConcurrentVoiceAndDataAllowed(int subId); - oneway void setVisualVoicemailEnabled(String callingPackage, - in PhoneAccountHandle accountHandle, boolean enabled); - - boolean isVisualVoicemailEnabled(String callingPackage, - in PhoneAccountHandle accountHandle); - String getVisualVoicemailPackageName(String callingPackage, int subId); // Not oneway, caller needs to make sure the vaule is set before receiving a SMS