From 0607dd9a16aebc9f268cdf8a0f9f5b63ed1b684f Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 27 Mar 2020 00:30:41 +0100 Subject: [PATCH] src_frameworkcommon: Fix filegroup base path The filegroups here were set up without an explicit path. As a result, the files within were incorrectly considered part of the "src_frameworkcommon.android.net.utils" package by droidstubs' filter_packages filter (and thus not fed into droidstubs). This CL fixes the filegroups by adding an explicit path to where the package tree starts for each of them, such that the path-based package filter in droidstubs can work correctly. Also @hide the classes which otherwise would now be considered exposed API by droidstubs. Bug: 151160048 Test: make checkapi Change-Id: I969fc9846294a42554233cffda725797ee0185f4 --- staticlibs/Android.bp | 7 +++++++ .../src_frameworkcommon/android/net/util/IpRange.java | 2 ++ .../android/net/util/LinkPropertiesUtils.java | 1 + .../android/net/util/MacAddressUtils.java | 1 + .../src_frameworkcommon/android/net/util/NetUtils.java | 1 + 5 files changed, 12 insertions(+) diff --git a/staticlibs/Android.bp b/staticlibs/Android.bp index 8f845bc2e8..d29ba3657f 100644 --- a/staticlibs/Android.bp +++ b/staticlibs/Android.bp @@ -23,9 +23,14 @@ // rules file. Otherwise, it will end up on the boot classpath and other modules will not be able // to provide their own copy. +// Note: all filegroups here must have the right path attribute because otherwise, if they are +// included in the bootclasspath, they could incorrectly be included in the SDK documentation even +// though they are not in the current.txt files. + filegroup { name: "net-utils-framework-common-srcs", srcs: ["src_frameworkcommon/**/*.java"], + path: "src_frameworkcommon", visibility: ["//frameworks/base"], } @@ -74,6 +79,7 @@ filegroup { // Any class here *must* have a corresponding jarjar rule in the telephony build rules. "src_servicescommon/android/net/NetworkFactory.java", ], + path: "src_servicescommon", visibility: [ "//frameworks/opt/telephony", ], @@ -88,6 +94,7 @@ filegroup { "src_frameworkcommon/android/net/util/nsd/DnsSdTxtRecord.java", "src_frameworkcommon/android/net/util/MacAddressUtils.java", ], + path: "src_frameworkcommon", visibility: [ "//frameworks/base", ], diff --git a/staticlibs/src_frameworkcommon/android/net/util/IpRange.java b/staticlibs/src_frameworkcommon/android/net/util/IpRange.java index 04e92773bb..099770bca4 100644 --- a/staticlibs/src_frameworkcommon/android/net/util/IpRange.java +++ b/staticlibs/src_frameworkcommon/android/net/util/IpRange.java @@ -39,6 +39,8 @@ import java.util.Queue; * *

Conversion to prefixes are deterministic, and will always return the same set of {@link * IpPrefix}(es). Ordering of IpPrefix instances is not guaranteed. + * + * @hide */ public final class IpRange { private static final int SIGNUM_POSITIVE = 1; diff --git a/staticlibs/src_frameworkcommon/android/net/util/LinkPropertiesUtils.java b/staticlibs/src_frameworkcommon/android/net/util/LinkPropertiesUtils.java index 812382694a..282fa10d2b 100644 --- a/staticlibs/src_frameworkcommon/android/net/util/LinkPropertiesUtils.java +++ b/staticlibs/src_frameworkcommon/android/net/util/LinkPropertiesUtils.java @@ -33,6 +33,7 @@ import java.util.function.Function; /** * Collection of link properties utilities. + * @hide */ public final class LinkPropertiesUtils { diff --git a/staticlibs/src_frameworkcommon/android/net/util/MacAddressUtils.java b/staticlibs/src_frameworkcommon/android/net/util/MacAddressUtils.java index 3ad452ba30..969d1270be 100644 --- a/staticlibs/src_frameworkcommon/android/net/util/MacAddressUtils.java +++ b/staticlibs/src_frameworkcommon/android/net/util/MacAddressUtils.java @@ -27,6 +27,7 @@ import java.util.Random; /** * Collection of MAC address utilities. + * @hide */ public final class MacAddressUtils { diff --git a/staticlibs/src_frameworkcommon/android/net/util/NetUtils.java b/staticlibs/src_frameworkcommon/android/net/util/NetUtils.java index e0065904fb..302119ea11 100644 --- a/staticlibs/src_frameworkcommon/android/net/util/NetUtils.java +++ b/staticlibs/src_frameworkcommon/android/net/util/NetUtils.java @@ -27,6 +27,7 @@ import java.util.Collection; /** * Collection of network common utilities. + * @hide */ public final class NetUtils {