Merge "Deprecate setVisualVoicemailEnabled isVisualVoicemailEnabled" into oc-dev
am: ad989b1711
Change-Id: I7a9f56a2585584fdce87025cd07c5c526c9bc176
diff --git a/api/system-current.txt b/api/system-current.txt
index fa476ae..a5da28e 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -43685,7 +43685,7 @@
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();
@@ -43702,7 +43702,7 @@
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 d60f25c..397aa00 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -2710,19 +2710,12 @@
* @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
- }
+
}
/**
@@ -2734,19 +2727,11 @@
* @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 b461a78..dd08f67 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -498,12 +498,6 @@
*/
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