Reimplement inferRestrictedCapability without new exposed API am: e22a397031 am: 48e0b5a19b

Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/net/+/1659978

Change-Id: I0e816d32d887721bc82101c4975c759eca93e395
diff --git a/staticlibs/testutils/Android.bp b/staticlibs/testutils/Android.bp
index bea5e5a..d4465dd 100644
--- a/staticlibs/testutils/Android.bp
+++ b/staticlibs/testutils/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 java_library {
     name: "net-tests-utils",
     srcs: [