From 855c9c8f88317af15b14aea04bb2460f2a695fde Mon Sep 17 00:00:00 2001 From: Chalard Jean Date: Fri, 9 Oct 2020 18:20:27 +0900 Subject: [PATCH] Remove deprecated constructors for NetworkAgent Finally. Now that mLegacy is always false, removing the support for legacy agents, a follow-up change will remove the member and all the associated code. Test: FrameworksNetTests NetworkStackTests Bug: 167544279 Change-Id: I6e2c27facdd3ecc232a0aa32bf57c33cb06f118e --- core/java/android/net/NetworkAgent.java | 29 ------------------------- 1 file changed, 29 deletions(-) diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java index 0676ad4e23..8354126359 100644 --- a/core/java/android/net/NetworkAgent.java +++ b/core/java/android/net/NetworkAgent.java @@ -337,35 +337,6 @@ public abstract class NetworkAgent { */ public static final int CMD_REMOVE_KEEPALIVE_PACKET_FILTER = BASE + 17; - /** @hide TODO: remove and replace usage with the public constructor. */ - public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni, - NetworkCapabilities nc, LinkProperties lp, int score) { - this(looper, context, logTag, ni, nc, lp, score, null, NetworkProvider.ID_NONE); - // Register done by the constructor called in the previous line - } - - /** @hide TODO: remove and replace usage with the public constructor. */ - public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni, - NetworkCapabilities nc, LinkProperties lp, int score, NetworkAgentConfig config) { - this(looper, context, logTag, ni, nc, lp, score, config, NetworkProvider.ID_NONE); - // Register done by the constructor called in the previous line - } - - /** @hide TODO: remove and replace usage with the public constructor. */ - public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni, - NetworkCapabilities nc, LinkProperties lp, int score, int providerId) { - this(looper, context, logTag, ni, nc, lp, score, null, providerId); - // Register done by the constructor called in the previous line - } - - /** @hide TODO: remove and replace usage with the public constructor. */ - public NetworkAgent(Looper looper, Context context, String logTag, NetworkInfo ni, - NetworkCapabilities nc, LinkProperties lp, int score, NetworkAgentConfig config, - int providerId) { - this(looper, context, logTag, nc, lp, score, config, providerId, ni, true /* legacy */); - register(); - } - private static NetworkInfo getLegacyNetworkInfo(final NetworkAgentConfig config) { // The subtype can be changed with (TODO) setLegacySubtype, but it starts // with 0 (TelephonyManager.NETWORK_TYPE_UNKNOWN) and an empty description.