Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -40540,6 +40540,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 boolean isVoiceCapable(); method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); Loading @@ -40553,6 +40554,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 boolean setVoiceMailNumber(java.lang.String, java.lang.String); method public void silenceRinger(); method public boolean supplyPin(java.lang.String); telephony/java/android/telephony/TelephonyManager.java +50 −0 Original line number Diff line number Diff line Loading @@ -2483,6 +2483,56 @@ public class TelephonyManager { return false; } /** * Enables or disables the visual voicemail client for a phone account. * * <p>Requires that the calling app is the default dialer, or has carrier privileges, or * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. * @see #hasCarrierPrivileges * * @param phoneAccountHandle the phone account to change the client state * @param enabled the new state of the client * @hide */ @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 } } /** * Returns whether the visual voicemail client is enabled. * * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * * @param phoneAccountHandle the phone account to check for. * @return {@code true} when the visual voicemail client is enabled for this client * @hide */ @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; } /** * Enables the visual voicemail SMS filter for a phone account. When the filter is * enabled, Incoming SMS messages matching the OMTP VVM SMS interface will be redirected to the Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -454,6 +454,12 @@ interface ITelephony { */ int getVoiceMessageCountForSubscriber(int subId); oneway void setVisualVoicemailEnabled(String callingPackage, in PhoneAccountHandle accountHandle, boolean enabled); boolean isVisualVoicemailEnabled(String callingPackage, in PhoneAccountHandle accountHandle); // Not oneway, caller needs to make sure the vaule is set before receiving a SMS void enableVisualVoicemailSmsFilter(String callingPackage, int subId, in VisualVoicemailSmsFilterSettings settings); Loading Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -40540,6 +40540,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 boolean isVoiceCapable(); method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); Loading @@ -40553,6 +40554,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 boolean setVoiceMailNumber(java.lang.String, java.lang.String); method public void silenceRinger(); method public boolean supplyPin(java.lang.String);
telephony/java/android/telephony/TelephonyManager.java +50 −0 Original line number Diff line number Diff line Loading @@ -2483,6 +2483,56 @@ public class TelephonyManager { return false; } /** * Enables or disables the visual voicemail client for a phone account. * * <p>Requires that the calling app is the default dialer, or has carrier privileges, or * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. * @see #hasCarrierPrivileges * * @param phoneAccountHandle the phone account to change the client state * @param enabled the new state of the client * @hide */ @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 } } /** * Returns whether the visual voicemail client is enabled. * * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * * @param phoneAccountHandle the phone account to check for. * @return {@code true} when the visual voicemail client is enabled for this client * @hide */ @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; } /** * Enables the visual voicemail SMS filter for a phone account. When the filter is * enabled, Incoming SMS messages matching the OMTP VVM SMS interface will be redirected to the Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -454,6 +454,12 @@ interface ITelephony { */ int getVoiceMessageCountForSubscriber(int subId); oneway void setVisualVoicemailEnabled(String callingPackage, in PhoneAccountHandle accountHandle, boolean enabled); boolean isVisualVoicemailEnabled(String callingPackage, in PhoneAccountHandle accountHandle); // Not oneway, caller needs to make sure the vaule is set before receiving a SMS void enableVisualVoicemailSmsFilter(String callingPackage, int subId, in VisualVoicemailSmsFilterSettings settings); Loading