From 83cbd8f8869f28cd40ac63ee89f77dd69964c14e Mon Sep 17 00:00:00 2001 From: Grace Jia Date: Mon, 3 Feb 2020 11:16:29 -0800 Subject: [PATCH] API review cleanups. 1) Make all exposed APIs SystemApi, instead of public APIs. 2) Indicate SipException when errors happen. 3) Change API name from getListOfProfiles to getProfiles Test: make, atest TeleServiceTests:PhoneGlobalsTest Bug: 148604927 Change-Id: Idae8353cb27ba8cc461f68e66c5f7fe14ecc9354 --- api/current.txt | 9 --------- api/system-current.txt | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/api/current.txt b/api/current.txt index 7f10d09aa107c..d79aa02e26400 100644 --- a/api/current.txt +++ b/api/current.txt @@ -29796,7 +29796,6 @@ package android.net.sip { method public void close(); method public void continueCall(int) throws android.net.sip.SipException; method public void endCall() throws android.net.sip.SipException; - method @Nullable public android.net.rtp.AudioGroup getAudioGroup(); method public android.net.sip.SipProfile getLocalProfile(); method public android.net.sip.SipProfile getPeerProfile(); method public int getState(); @@ -29807,7 +29806,6 @@ package android.net.sip { method public void makeCall(android.net.sip.SipProfile, android.net.sip.SipSession, int) throws android.net.sip.SipException; method public void sendDtmf(int); method public void sendDtmf(int, android.os.Message); - method public void setAudioGroup(@NonNull android.net.rtp.AudioGroup); method public void setListener(android.net.sip.SipAudioCall.Listener); method public void setListener(android.net.sip.SipAudioCall.Listener, boolean); method public void setSpeakerMode(boolean); @@ -29856,7 +29854,6 @@ package android.net.sip { method public void close(String) throws android.net.sip.SipException; method public android.net.sip.SipSession createSipSession(android.net.sip.SipProfile, android.net.sip.SipSession.Listener) throws android.net.sip.SipException; method public static String getCallId(android.content.Intent); - method @NonNull public java.util.List getListOfProfiles() throws android.net.sip.SipException; method public static String getOfferSessionDescription(android.content.Intent); method public android.net.sip.SipSession getSessionFor(android.content.Intent) throws android.net.sip.SipException; method public static boolean isApiSupported(android.content.Context); @@ -29874,11 +29871,6 @@ package android.net.sip { method public void setRegistrationListener(String, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException; method public android.net.sip.SipAudioCall takeAudioCall(android.content.Intent, android.net.sip.SipAudioCall.Listener) throws android.net.sip.SipException; method public void unregister(android.net.sip.SipProfile, android.net.sip.SipRegistrationListener) throws android.net.sip.SipException; - field public static final String ACTION_SIP_CALL_OPTION_CHANGED = "android.net.sip.action.SIP_CALL_OPTION_CHANGED"; - field public static final String ACTION_SIP_INCOMING_CALL = "android.net.sip.action.SIP_INCOMING_CALL"; - field public static final String ACTION_SIP_REMOVE_PROFILE = "android.net.sip.action.SIP_REMOVE_PROFILE"; - field public static final String ACTION_SIP_SERVICE_UP = "android.net.sip.action.SIP_SERVICE_UP"; - field public static final String ACTION_START_SIP = "android.net.sip.action.START_SIP"; field public static final String EXTRA_CALL_ID = "android:sipCallID"; field public static final String EXTRA_OFFER_SD = "android:sipOfferSD"; field public static final int INCOMING_CALL_RESULT_CODE = 101; // 0x65 @@ -29888,7 +29880,6 @@ package android.net.sip { method public int describeContents(); method public String getAuthUserName(); method public boolean getAutoRegistration(); - method public int getCallingUid(); method public String getDisplayName(); method public String getPassword(); method public int getPort(); diff --git a/api/system-current.txt b/api/system-current.txt index 1c43e095fc740..ac287b226998d 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5434,6 +5434,28 @@ package android.net.netstats.provider { } +package android.net.sip { + + public class SipAudioCall { + method @Nullable public android.net.rtp.AudioGroup getAudioGroup(); + method public void setAudioGroup(@NonNull android.net.rtp.AudioGroup); + } + + public class SipManager { + method @NonNull public java.util.List getProfiles() throws android.net.sip.SipException; + field public static final String ACTION_SIP_CALL_OPTION_CHANGED = "android.net.sip.action.SIP_CALL_OPTION_CHANGED"; + field public static final String ACTION_SIP_INCOMING_CALL = "android.net.sip.action.SIP_INCOMING_CALL"; + field public static final String ACTION_SIP_REMOVE_PROFILE = "android.net.sip.action.SIP_REMOVE_PROFILE"; + field public static final String ACTION_SIP_SERVICE_UP = "android.net.sip.action.SIP_SERVICE_UP"; + field public static final String ACTION_START_SIP = "android.net.sip.action.START_SIP"; + } + + public class SipProfile implements java.lang.Cloneable android.os.Parcelable java.io.Serializable { + method public int getCallingUid(); + } + +} + package android.net.util { public final class SocketUtils {