From 6b91ebf58c928987ead635bb1c49a16965d4c835 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Wed, 1 Apr 2015 09:36:19 -0700 Subject: [PATCH 1/2] Prevent merging conference calls hosted on peer device. With IMS, the "multiparty" bit on an ImsCall is set to "true" when a call is merged into a conference. This not only occurs on the device hosting the conference call, but also on the devices of the callers merged into the conference. This CL adds a listener to the ImsCallSessionListener which is used to communicate a change in the multiparty state of an ImsCallSession to the ImsCall. This solves a problem where the RIL knows of the change, but since there is no callback, the change is not noticed by Telephony until another call state change occurrs (e.g. holding the call). Bug: 19478784 Change-Id: I4847ab3b63f6a00a91d1324196f181467d1753a4 --- .../com/android/ims/internal/IImsCallSessionListener.aidl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl index 84d1c54575f8e..0443c3edb9747 100644 --- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl +++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl @@ -115,4 +115,12 @@ interface IImsCallSessionListener { * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} */ void callSessionTtyModeReceived(in IImsCallSession session, in int mode); + + /** + * Notifies of a change to the multiparty state for this {@code ImsCallSession}. + * + * @param session The call session. + * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise. + */ + void callSessionMultipartyStateChanged(in IImsCallSession session, in boolean isMultiParty); } From 3541e9f469c3cb563bb89d52cbe7daf9e0f8d124 Mon Sep 17 00:00:00 2001 From: Paul Jensen Date: Wed, 18 Mar 2015 12:23:02 -0400 Subject: [PATCH 2/2] Deprecate connectivity APIs relying on integer network types. Recommend ConnectivityManager.getAllNetworks() and various state inspection functions as a way forward. Bug:19608294 Change-Id: Ibd53629995897047fc532ffa56f079dfba10a7c7 --- api/current.txt | 4 ++-- api/system-current.txt | 4 ++-- .../java/android/net/ConnectivityManager.java | 21 +++++++++++++++---- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/api/current.txt b/api/current.txt index de0e3361d7f96..acfc72ee304e4 100644 --- a/api/current.txt +++ b/api/current.txt @@ -16963,14 +16963,14 @@ package android.net { method public boolean bindProcessToNetwork(android.net.Network); method public android.net.Network getActiveNetwork(); method public android.net.NetworkInfo getActiveNetworkInfo(); - method public android.net.NetworkInfo[] getAllNetworkInfo(); + method public deprecated android.net.NetworkInfo[] getAllNetworkInfo(); method public android.net.Network[] getAllNetworks(); method public deprecated boolean getBackgroundDataSetting(); method public android.net.Network getBoundNetworkForProcess(); method public android.net.ProxyInfo getDefaultProxy(); method public android.net.LinkProperties getLinkProperties(android.net.Network); method public android.net.NetworkCapabilities getNetworkCapabilities(android.net.Network); - method public android.net.NetworkInfo getNetworkInfo(int); + method public deprecated android.net.NetworkInfo getNetworkInfo(int); method public android.net.NetworkInfo getNetworkInfo(android.net.Network); method public deprecated int getNetworkPreference(); method public static deprecated android.net.Network getProcessDefaultNetwork(); diff --git a/api/system-current.txt b/api/system-current.txt index 8afac60275e14..84c0b87b28158 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -18224,14 +18224,14 @@ package android.net { method public boolean bindProcessToNetwork(android.net.Network); method public android.net.Network getActiveNetwork(); method public android.net.NetworkInfo getActiveNetworkInfo(); - method public android.net.NetworkInfo[] getAllNetworkInfo(); + method public deprecated android.net.NetworkInfo[] getAllNetworkInfo(); method public android.net.Network[] getAllNetworks(); method public deprecated boolean getBackgroundDataSetting(); method public android.net.Network getBoundNetworkForProcess(); method public android.net.ProxyInfo getDefaultProxy(); method public android.net.LinkProperties getLinkProperties(android.net.Network); method public android.net.NetworkCapabilities getNetworkCapabilities(android.net.Network); - method public android.net.NetworkInfo getNetworkInfo(int); + method public deprecated android.net.NetworkInfo getNetworkInfo(int); method public android.net.NetworkInfo getNetworkInfo(android.net.Network); method public deprecated int getNetworkPreference(); method public static deprecated android.net.Network getProcessDefaultNetwork(); diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 050cafc562493..1125e6deb14ab 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -115,8 +115,7 @@ public class ConnectivityManager { * * @deprecated Since {@link NetworkInfo} can vary based on UID, applications * should always obtain network information through - * {@link #getActiveNetworkInfo()} or - * {@link #getAllNetworkInfo()}. + * {@link #getActiveNetworkInfo()}. * @see #EXTRA_NETWORK_TYPE */ @Deprecated @@ -124,8 +123,6 @@ public class ConnectivityManager { /** * Network type which triggered a {@link #CONNECTIVITY_ACTION} broadcast. - * Can be used with {@link #getNetworkInfo(int)} to get {@link NetworkInfo} - * state based on the calling application. * * @see android.content.Intent#getIntExtra(String, int) */ @@ -655,6 +652,10 @@ public class ConnectivityManager { * *

This method requires the caller to hold the permission * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. + * + * @deprecated This method does not support multiple connected networks + * of the same type. Use {@link #getAllNetworks} and + * {@link #getNetworkInfo(android.net.Network)} instead. */ public NetworkInfo getNetworkInfo(int networkType) { try { @@ -694,6 +695,10 @@ public class ConnectivityManager { * *

This method requires the caller to hold the permission * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. + * + * @deprecated This method does not support multiple connected networks + * of the same type. Use {@link #getAllNetworks} and + * {@link #getNetworkInfo(android.net.Network)} instead. */ public NetworkInfo[] getAllNetworkInfo() { try { @@ -711,6 +716,9 @@ public class ConnectivityManager { * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. * * @hide + * @deprecated This method does not support multiple connected networks + * of the same type. Use {@link #getAllNetworks} and + * {@link #getNetworkInfo(android.net.Network)} instead. */ public Network getNetworkForType(int networkType) { try { @@ -803,6 +811,10 @@ public class ConnectivityManager { *

This method requires the caller to hold the permission * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. * {@hide} + * @deprecated This method does not support multiple connected networks + * of the same type. Use {@link #getAllNetworks}, + * {@link #getNetworkInfo(android.net.Network)}, and + * {@link #getLinkProperties(android.net.Network)} instead. */ public LinkProperties getLinkProperties(int networkType) { try { @@ -1932,6 +1944,7 @@ public class ConnectivityManager { * @param networkType * * {@hide} + * @deprecated Doesn't properly deal with multiple connected networks of the same type. */ public void setProvisioningNotificationVisible(boolean visible, int networkType, String action) {