Loading api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6217,6 +6217,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method public boolean addPcscfServer(@NonNull java.net.InetAddress); Loading @@ -6239,7 +6240,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); Loading api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1789,6 +1789,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method @Nullable public android.net.Uri getCaptivePortalApiUrl(); Loading @@ -1803,7 +1804,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); Loading core/java/android/net/LinkProperties.java +13 −17 Original line number Diff line number Diff line Loading @@ -167,7 +167,19 @@ public final class LinkProperties implements Parcelable { this(source, false /* parcelSensitiveFields */); } private LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { /** * Create a copy of a {@link LinkProperties} that may preserve fields that were set * based on the permissions of the process that originally received it. * * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as * they should not be shared outside of the process that receives them without appropriate * checks. * @param parcelSensitiveFields Whether the sensitive fields should be kept when parceling * @hide */ @SystemApi @TestApi public LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { mParcelSensitiveFields = parcelSensitiveFields; if (source == null) return; mIfaceName = source.mIfaceName; Loading Loading @@ -1582,22 +1594,6 @@ public final class LinkProperties implements Parcelable { return mCaptivePortalData; } /** * Create a copy of this {@link LinkProperties} that will preserve fields that were set * based on the permissions of the process that received this {@link LinkProperties}. * * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as * they should not be shared outside of the process that receives them without appropriate * checks. * @hide */ @SystemApi @TestApi @NonNull public LinkProperties makeSensitiveFieldsParcelingCopy() { return new LinkProperties(this, true /* parcelSensitiveFields */); } /** * Compares this {@code LinkProperties} instance against the target * LinkProperties in {@code obj}. Two LinkPropertieses are equal if Loading services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1713,7 +1713,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } if (checkSettingsPermission(callerPid, callerUid)) { return lp.makeSensitiveFieldsParcelingCopy(); return new LinkProperties(lp, true /* parcelSensitiveFields */); } final LinkProperties newLp = new LinkProperties(lp); Loading tests/net/common/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ java_library { name: "FrameworksNetCommonTests", srcs: ["java/**/*.java", "java/**/*.kt"], static_libs: [ "androidx.core_core", "androidx.test.rules", "junit", "mockito-target-minus-junit4", Loading Loading
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6217,6 +6217,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method public boolean addPcscfServer(@NonNull java.net.InetAddress); Loading @@ -6239,7 +6240,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); Loading
api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1789,6 +1789,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method @Nullable public android.net.Uri getCaptivePortalApiUrl(); Loading @@ -1803,7 +1804,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); Loading
core/java/android/net/LinkProperties.java +13 −17 Original line number Diff line number Diff line Loading @@ -167,7 +167,19 @@ public final class LinkProperties implements Parcelable { this(source, false /* parcelSensitiveFields */); } private LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { /** * Create a copy of a {@link LinkProperties} that may preserve fields that were set * based on the permissions of the process that originally received it. * * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as * they should not be shared outside of the process that receives them without appropriate * checks. * @param parcelSensitiveFields Whether the sensitive fields should be kept when parceling * @hide */ @SystemApi @TestApi public LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { mParcelSensitiveFields = parcelSensitiveFields; if (source == null) return; mIfaceName = source.mIfaceName; Loading Loading @@ -1582,22 +1594,6 @@ public final class LinkProperties implements Parcelable { return mCaptivePortalData; } /** * Create a copy of this {@link LinkProperties} that will preserve fields that were set * based on the permissions of the process that received this {@link LinkProperties}. * * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as * they should not be shared outside of the process that receives them without appropriate * checks. * @hide */ @SystemApi @TestApi @NonNull public LinkProperties makeSensitiveFieldsParcelingCopy() { return new LinkProperties(this, true /* parcelSensitiveFields */); } /** * Compares this {@code LinkProperties} instance against the target * LinkProperties in {@code obj}. Two LinkPropertieses are equal if Loading
services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1713,7 +1713,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } if (checkSettingsPermission(callerPid, callerUid)) { return lp.makeSensitiveFieldsParcelingCopy(); return new LinkProperties(lp, true /* parcelSensitiveFields */); } final LinkProperties newLp = new LinkProperties(lp); Loading
tests/net/common/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ java_library { name: "FrameworksNetCommonTests", srcs: ["java/**/*.java", "java/**/*.kt"], static_libs: [ "androidx.core_core", "androidx.test.rules", "junit", "mockito-target-minus-junit4", Loading