diff options
| author | 2019-12-11 21:56:19 +0000 | |
|---|---|---|
| committer | 2019-12-11 21:56:19 +0000 | |
| commit | 85d23aa0b48369ad0e09ef4ccf9161b67b156928 (patch) | |
| tree | e58de69a94151f70ce68b98105e7a7b867f737a5 | |
| parent | 89cb6a04abc81c39c4ec1907f121d92b98893b32 (diff) | |
| parent | 3780da605a4ed79ee1c44d2fb52cd5a2b8284df4 (diff) | |
Merge "Remove ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED" am: 6fce89f8b6 am: 3780da605a
Change-Id: I6df8824ca6a5ba668d49e728434cc6d9cacda8a3
| -rw-r--r-- | services/core/java/com/android/server/TelephonyRegistry.java | 24 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 94 |
2 files changed, 0 insertions, 118 deletions
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 8be9da248e54..be95456bfef6 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -1610,8 +1610,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } broadcastDataConnectionStateChanged(state, isDataAllowed, apn, apnType, linkProperties, networkCapabilities, roaming, subId); - broadcastPreciseDataConnectionStateChanged(state, networkType, apnType, apn, - linkProperties, DataFailCause.NONE); } public void notifyDataConnectionFailed(String apnType) { @@ -1651,9 +1649,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { handleRemoveListLocked(); } broadcastDataConnectionFailed(apnType, subId); - broadcastPreciseDataConnectionStateChanged(TelephonyManager.DATA_UNKNOWN, - TelephonyManager.NETWORK_TYPE_UNKNOWN, apnType, null, null, - DataFailCause.NONE); } public void notifyCellLocation(Bundle cellLocation) { @@ -1852,8 +1847,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { handleRemoveListLocked(); } - broadcastPreciseDataConnectionStateChanged(TelephonyManager.DATA_UNKNOWN, - TelephonyManager.NETWORK_TYPE_UNKNOWN, apnType, apn, null, failCause); } @Override @@ -2345,23 +2338,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL); } - private void broadcastPreciseDataConnectionStateChanged(int state, int networkType, - String apnType, String apn, LinkProperties linkProperties, - @DataFailureCause int failCause) { - Intent intent = new Intent(TelephonyManager.ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED); - intent.putExtra(TelephonyManager.EXTRA_STATE, state); - intent.putExtra(PhoneConstants.DATA_NETWORK_TYPE_KEY, networkType); - if (apnType != null) intent.putExtra(PhoneConstants.DATA_APN_TYPE_KEY, apnType); - if (apn != null) intent.putExtra(PhoneConstants.DATA_APN_KEY, apn); - if (linkProperties != null) { - intent.putExtra(PhoneConstants.DATA_LINK_PROPERTIES_KEY, linkProperties); - } - intent.putExtra(PhoneConstants.DATA_FAILURE_CAUSE_KEY, failCause); - - mContext.sendBroadcastAsUser(intent, UserHandle.ALL, - android.Manifest.permission.READ_PRECISE_PHONE_STATE); - } - private void enforceNotifyPermissionOrCarrierPrivilege(String method) { if (checkNotifyPermission()) { return; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 9491c445147b..97a327336a7b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -763,88 +763,6 @@ public class TelephonyManager { public static final String EXTRA_PRECISE_DISCONNECT_CAUSE = "precise_disconnect_cause"; /** - * Broadcast intent action indicating a data connection has changed, - * providing precise information about the connection. - * - * <p> - * The {@link #EXTRA_DATA_STATE} extra indicates the connection state. - * The {@link #EXTRA_DATA_NETWORK_TYPE} extra indicates the connection network type. - * The {@link #EXTRA_DATA_APN_TYPE} extra indicates the APN type. - * The {@link #EXTRA_DATA_APN} extra indicates the APN. - * The {@link #EXTRA_DATA_IFACE_PROPERTIES} extra indicates the connection interface. - * The {@link #EXTRA_DATA_FAILURE_CAUSE} extra indicates the connection fail cause. - * - * <p class="note"> - * Requires the READ_PRECISE_PHONE_STATE permission. - * - * @see #EXTRA_DATA_STATE - * @see #EXTRA_DATA_NETWORK_TYPE - * @see #EXTRA_DATA_APN_TYPE - * @see #EXTRA_DATA_APN - * @see #EXTRA_DATA_IFACE - * @see #EXTRA_DATA_FAILURE_CAUSE - * @hide - * - * @deprecated If the app is running in the background, it won't be able to receive this - * broadcast. Apps should use ConnectivityManager {@link #registerNetworkCallback( - * android.net.NetworkRequest, ConnectivityManager.NetworkCallback)} to listen for network - * changes. - */ - @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) - @Deprecated - @UnsupportedAppUsage - public static final String ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED = - "android.intent.action.PRECISE_DATA_CONNECTION_STATE_CHANGED"; - - /** - * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast - * for an integer containing the state of the current data connection. - * - * @see TelephonyManager#DATA_UNKNOWN - * @see TelephonyManager#DATA_DISCONNECTED - * @see TelephonyManager#DATA_CONNECTING - * @see TelephonyManager#DATA_CONNECTED - * @see TelephonyManager#DATA_SUSPENDED - * - * <p class="note"> - * Retrieve with - * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. - * - * @hide - */ - public static final String EXTRA_DATA_STATE = PhoneConstants.STATE_KEY; - - /** - * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast - * for an integer containing the network type. - * - * @see TelephonyManager#NETWORK_TYPE_UNKNOWN - * @see TelephonyManager#NETWORK_TYPE_GPRS - * @see TelephonyManager#NETWORK_TYPE_EDGE - * @see TelephonyManager#NETWORK_TYPE_UMTS - * @see TelephonyManager#NETWORK_TYPE_CDMA - * @see TelephonyManager#NETWORK_TYPE_EVDO_0 - * @see TelephonyManager#NETWORK_TYPE_EVDO_A - * @see TelephonyManager#NETWORK_TYPE_1xRTT - * @see TelephonyManager#NETWORK_TYPE_HSDPA - * @see TelephonyManager#NETWORK_TYPE_HSUPA - * @see TelephonyManager#NETWORK_TYPE_HSPA - * @see TelephonyManager#NETWORK_TYPE_IDEN - * @see TelephonyManager#NETWORK_TYPE_EVDO_B - * @see TelephonyManager#NETWORK_TYPE_LTE - * @see TelephonyManager#NETWORK_TYPE_EHRPD - * @see TelephonyManager#NETWORK_TYPE_HSPAP - * @see TelephonyManager#NETWORK_TYPE_NR - * - * <p class="note"> - * Retrieve with - * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. - * - * @hide - */ - public static final String EXTRA_DATA_NETWORK_TYPE = PhoneConstants.DATA_NETWORK_TYPE_KEY; - - /** * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast * for an String containing the data APN type. * @@ -881,18 +799,6 @@ public class TelephonyManager { public static final String EXTRA_DATA_LINK_PROPERTIES_KEY = PhoneConstants.DATA_LINK_PROPERTIES_KEY; /** - * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast - * for the data connection fail cause. - * - * <p class="note"> - * Retrieve with - * {@link android.content.Intent#getStringExtra(String name)}. - * - * @hide - */ - public static final String EXTRA_DATA_FAILURE_CAUSE = PhoneConstants.DATA_FAILURE_CAUSE_KEY; - - /** * Broadcast intent action for letting the default dialer to know to show voicemail * notification. * |