From e356825e4a92e045a51d09b63e31dd9ce8e83d5a Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Tue, 17 Jun 2014 14:05:21 -0700 Subject: [PATCH] Remove Obsolete enable/disableApn functions. ConnectivityService now uses NetworkAgents instead and apps should use ConnectivityManager. Change-Id: Ifc5c8f5be802183e70a5d92b224c819815de00e6 --- .../android/net/MobileDataStateTracker.java | 18 +++++++-------- .../android/telephony/TelephonyManager.java | 22 ------------------- .../internal/telephony/ITelephony.aidl | 21 ------------------ 3 files changed, 9 insertions(+), 52 deletions(-) diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index 535bbe2415ef1..81426704cc0fc 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -699,15 +699,15 @@ public class MobileDataStateTracker extends BaseNetworkStateTracker { break; } - try { - if (enable) { - return mPhoneService.enableApnType(apnType); - } else { - return mPhoneService.disableApnType(apnType); - } - } catch (RemoteException e) { - if (retry == 0) getPhoneService(true); - } +// try { +// if (enable) { +// return mPhoneService.enableApnType(apnType); +// } else { +// return mPhoneService.disableApnType(apnType); +// } +// } catch (RemoteException e) { +// if (retry == 0) getPhoneService(true); +// } } loge("Could not " + (enable ? "enable" : "disable") + " APN type \"" + apnType + "\""); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 50bbb1edc9628..99c4f6aeb0ef6 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3026,28 +3026,6 @@ public class TelephonyManager { } } - /** @hide */ - @SystemApi - public int enableApnType(String type) { - try { - return getITelephony().enableApnType(type); - } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#enableApnType", e); - } - return PhoneConstants.APN_REQUEST_FAILED; - } - - /** @hide */ - @SystemApi - public int disableApnType(String type) { - try { - return getITelephony().disableApnType(type); - } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#disableApnType", e); - } - return PhoneConstants.APN_REQUEST_FAILED; - } - /** @hide */ @SystemApi public boolean enableDataConnectivity() { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 407da87292b84..beee6167e422e 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -310,27 +310,6 @@ interface ITelephony { */ void disableLocationUpdatesUsingSubId(long subId); - - /** - * Enable a specific APN type. - */ - int enableApnType(String type); - - /** - * Disable a specific APN type. - */ - int disableApnType(String type); - - /** - * Enable a specific APN type with subscription. - */ - int enableApnTypeUsingSub(long subId, String type); - - /** - * Disable a specific APN type with subscription. - */ - int disableApnTypeUsingSub(long subId, String type); - /** * Allow mobile data connections. */