From 63ff5c3b51371bc4002a4979d3df4e5f2e85cd43 Mon Sep 17 00:00:00 2001 From: lucaslin Date: Wed, 27 Jan 2021 17:17:36 +0800 Subject: [PATCH] Remove unused method from MatchAllNetworkSpecifier checkNotMatchAllNetworkSpecifier is a hidden method inside MatchAllNetworkSpecifier, and the callers have implemented the logic by themselves to prevent calling hidden method. Remove it because there is no one using it. Bug: 172183305 Test: atest FrameworksNetTests Change-Id: I22a3a99f2b4ec6f4b57ef8867b72d48db2f0c1f6 --- core/java/android/net/MatchAllNetworkSpecifier.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/java/android/net/MatchAllNetworkSpecifier.java b/core/java/android/net/MatchAllNetworkSpecifier.java index 70c4a7235b9de..011a04c261374 100644 --- a/core/java/android/net/MatchAllNetworkSpecifier.java +++ b/core/java/android/net/MatchAllNetworkSpecifier.java @@ -31,17 +31,6 @@ import android.os.Parcelable; */ @SystemApi public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements Parcelable { - /** - * Utility method which verifies that the ns argument is not a MatchAllNetworkSpecifier and - * throws an IllegalArgumentException if it is. - * @hide - */ - public static void checkNotMatchAllNetworkSpecifier(NetworkSpecifier ns) { - if (ns instanceof MatchAllNetworkSpecifier) { - throw new IllegalArgumentException("A MatchAllNetworkSpecifier is not permitted"); - } - } - /** @hide */ @Override public boolean canBeSatisfiedBy(NetworkSpecifier other) {