Merge "Deprecate getNetworkType" am: d47ae01063

am: 40ae3d6281

Change-Id: I6f07d8a9766a89a6b2905124f00a1abd7bf1f4a1
This commit is contained in:
Nathan Harold
2019-05-27 14:34:31 -07:00
committed by android-build-merger
2 changed files with 6 additions and 1 deletions

View File

@@ -44936,7 +44936,7 @@ package android.telephony {
method public String getNetworkOperator();
method public String getNetworkOperatorName();
method public String getNetworkSpecifier();
method public int getNetworkType();
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getNetworkType();
method public int getPhoneCount();
method public int getPhoneType();
method @RequiresPermission(anyOf={"android.permission.READ_PRIVILEGED_PHONE_STATE", android.Manifest.permission.READ_PHONE_STATE}) public int getPreferredOpportunisticDataSubscription();

View File

@@ -2512,8 +2512,13 @@ public class TelephonyManager {
public @interface NetworkType{}
/**
* Return the current data network type.
*
* @deprecated use {@link #getDataNetworkType()}
* @return the NETWORK_TYPE_xxxx for current data connection.
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public @NetworkType int getNetworkType() {
return getNetworkType(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
}