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

Commit 27a931eb authored by Ta-wei Yen's avatar Ta-wei Yen Committed by android-build-merger
Browse files

Merge "Deprecate setVisualVoicemailEnabled isVisualVoicemailEnabled" into oc-dev am: ad989b17

am: 63668e43

Change-Id: I51e4f432edb54180cd11e95d5a0df32a1ede546f
parents 405fd19d 63668e43
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -43692,7 +43692,7 @@ package android.telephony {
    method public boolean isSmsCapable();
    method public boolean isSmsCapable();
    method public boolean isTtyModeSupported();
    method public boolean isTtyModeSupported();
    method public boolean isVideoCallingEnabled();
    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 isVoiceCapable();
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle);
    method public boolean isWorldPhone();
    method public boolean isWorldPhone();
@@ -43709,7 +43709,7 @@ package android.telephony {
    method public boolean setPreferredNetworkTypeToGlobal();
    method public boolean setPreferredNetworkTypeToGlobal();
    method public boolean setRadio(boolean);
    method public boolean setRadio(boolean);
    method public boolean setRadioPower(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 boolean setVoiceMailNumber(java.lang.String, java.lang.String);
    method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
    method public void setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle, android.net.Uri);
    method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean);
    method public void setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle, boolean);
+5 −20
Original line number Original line Diff line number Diff line
@@ -2710,19 +2710,12 @@ public class TelephonyManager {
     * @param phoneAccountHandle the phone account to change the client state
     * @param phoneAccountHandle the phone account to change the client state
     * @param enabled the new state of the client
     * @param enabled the new state of the client
     * @hide
     * @hide
     * @deprecated Visual voicemail no longer in telephony. {@link VisualVoicemailService} should
     * be implemented instead.
     */
     */
    @SystemApi
    @SystemApi
    public void setVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle, boolean enabled){
    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 @@ public class TelephonyManager {
     * @param phoneAccountHandle the phone account to check for.
     * @param phoneAccountHandle the phone account to check for.
     * @return {@code true} when the visual voicemail client is enabled for this client
     * @return {@code true} when the visual voicemail client is enabled for this client
     * @hide
     * @hide
     * @deprecated Visual voicemail no longer in telephony. {@link VisualVoicemailService} should
     * be implemented instead.
     */
     */
    @SystemApi
    @SystemApi
    public boolean isVisualVoicemailEnabled(PhoneAccountHandle phoneAccountHandle){
    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;
        return false;
    }
    }


+0 −6
Original line number Original line Diff line number Diff line
@@ -498,12 +498,6 @@ interface ITelephony {
      */
      */
    boolean isConcurrentVoiceAndDataAllowed(int subId);
    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);
    String getVisualVoicemailPackageName(String callingPackage, int subId);


    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS