Loading common/moduleutils/src/android/net/shared/Layer2Information.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net.shared; package android.net.shared; import android.annotation.Nullable; import android.net.Layer2InformationParcelable; import android.net.Layer2InformationParcelable; import android.net.MacAddress; import android.net.MacAddress; Loading @@ -23,14 +24,18 @@ import java.util.Objects; /** @hide */ /** @hide */ public class Layer2Information { public class Layer2Information { @Nullable public final String mL2Key; public final String mL2Key; @Nullable public final String mGroupHint; public final String mGroupHint; @Nullable public final MacAddress mBssid; public final MacAddress mBssid; /** /** * Create a Layer2Information with the specified configuration. * Create a Layer2Information with the specified configuration. */ */ public Layer2Information(String l2Key, String groupHint, MacAddress bssid) { public Layer2Information(@Nullable final String l2Key, @Nullable final String groupHint, @Nullable final MacAddress bssid) { mL2Key = l2Key; mL2Key = l2Key; mGroupHint = groupHint; mGroupHint = groupHint; mBssid = bssid; mBssid = bssid; Loading @@ -41,7 +46,7 @@ public class Layer2Information { StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer(); str.append("L2Key: ").append(mL2Key); str.append("L2Key: ").append(mL2Key); str.append(", GroupHint: ").append(mGroupHint); str.append(", GroupHint: ").append(mGroupHint); str.append(", bssid: ").append(mBssid.toString()); str.append(", bssid: ").append(mBssid); return str.toString(); return str.toString(); } } Loading common/networkstackclient/Android.bp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,13 @@ aidl_interface { "src/android/net/ip/IIpClientCallbacks.aidl", "src/android/net/ip/IIpClientCallbacks.aidl", ], ], backend: { backend: { java: { apex_available: [ "//apex_available:platform", "com.android.bluetooth.updatable", "com.android.wifi", ], }, ndk: { ndk: { enabled: false, enabled: false, }, }, Loading Loading @@ -117,7 +124,7 @@ java_library { ], ], static_libs: [ static_libs: [ "ipmemorystore-aidl-interfaces-V5-java", "ipmemorystore-aidl-interfaces-V5-java", "networkstack-aidl-interfaces-unstable-java", "networkstack-aidl-interfaces-java", ], ], visibility: [ visibility: [ "//frameworks/base/packages/Tethering", "//frameworks/base/packages/Tethering", Loading res/values-mcc460/config.xml +12 −0 Original line number Original line Diff line number Diff line Loading @@ -5,7 +5,19 @@ general case as this could degrade the user experience (portals not detected properly). general case as this could degrade the user experience (portals not detected properly). However in China the default URLs are not accessible in general. The below alternatives However in China the default URLs are not accessible in general. The below alternatives should allow users to connect to local networks normally. --> should allow users to connect to local networks normally. --> <!-- default_captive_portal_https_url is not configured as overlayable so OEMs that wish to change captive_portal_https_url configuration must do so via configuring runtime resource overlay to config_captive_portal_https_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string> <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string> <!-- default_captive_portal_fallback_urls is not configured as overlayable so OEMs that wish to change captive_portal_fallback_urls configuration must do so via configuring runtime resource overlay to config_captive_portal_fallback_urls and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <item>http://www.googleapis.cn/generate_204</item> <item>http://www.googleapis.cn/generate_204</item> </string-array> </string-array> Loading res/values/config.xml +20 −12 Original line number Original line Diff line number Diff line Loading @@ -6,28 +6,34 @@ The overlays must apply to the config_* values, not the default_* values. The default_* The overlays must apply to the config_* values, not the default_* values. The default_* values are meant to be the default when no other configuration is specified. values are meant to be the default when no other configuration is specified. --> --> <!-- DNS probe timeout for network validation. Enough for 3 DNS queries 5 seconds apart. --> <integer name="default_captive_portal_dns_probe_timeout">12500</integer> <!-- HTTP URL for network validation, to use for detecting captive portals. --> <!-- HTTP URL for network validation, to use for detecting captive portals. --> <!-- default_captive_portal_http_url is not configured as overlayable so OEMs that wish to change captive_portal_http_url configuration must do so via configuring runtime resource overlay to config_captive_portal_http_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> <!-- HTTPS URL for network validation, to use for confirming internet connectivity. --> <!-- HTTPS URL for network validation, to use for confirming internet connectivity. --> <!-- default_captive_portal_https_url is not configured as overlayable so OEMs that wish to change captive_portal_https_url configuration must do so via configuring runtime resource overlay to config_captive_portal_https_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> <!-- List of fallback URLs to use for detecting captive portals. --> <!-- List of fallback URLs to use for detecting captive portals. --> <!-- default_captive_portal_fallback_urls is not configured as overlayable so OEMs that wish to change captive_portal_fallback_urls configuration must do so via configuring runtime resource overlay to config_captive_portal_fallback_urls and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <item>http://www.google.com/gen_204</item> <item>http://www.google.com/gen_204</item> <item>http://play.googleapis.com/generate_204</item> <item>http://play.googleapis.com/generate_204</item> </string-array> </string-array> <!-- List of fallback probe specs to use for detecting captive portals. This is an alternative to fallback URLs that provides more flexibility on detection rules. Empty, so unused by default. --> <string-array name="default_captive_portal_fallback_probe_specs" translatable="false"> </string-array> <!-- Configuration hooks for the above settings. <!-- Configuration hooks for the above settings. Empty by default but may be overridden by RROs. --> Empty by default but may be overridden by RROs. --> <integer name="config_captive_portal_dns_probe_timeout"></integer> <integer name="config_captive_portal_dns_probe_timeout"></integer> Loading @@ -35,6 +41,8 @@ <string name="config_captive_portal_http_url" translatable="false"></string> <string name="config_captive_portal_http_url" translatable="false"></string> <!--suppress CheckTagEmptyBody: overlayable resource to use as configuration hook --> <!--suppress CheckTagEmptyBody: overlayable resource to use as configuration hook --> <string name="config_captive_portal_https_url" translatable="false"></string> <string name="config_captive_portal_https_url" translatable="false"></string> <!-- Literal commas are not allowed in the url configuration because they are used as a separator internally. --> <string-array name="config_captive_portal_fallback_urls" translatable="false"> <string-array name="config_captive_portal_fallback_urls" translatable="false"> </string-array> </string-array> <string-array name="config_captive_portal_fallback_probe_specs" translatable="false"> <string-array name="config_captive_portal_fallback_probe_specs" translatable="false"> Loading src/android/net/dhcp/DhcpPacket.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1182,8 +1182,8 @@ public abstract class DhcpPacket { vendorId = readAsciiString(packet, optionLen, true); vendorId = readAsciiString(packet, optionLen, true); break; break; case DHCP_CLIENT_IDENTIFIER: { // Client identifier case DHCP_CLIENT_IDENTIFIER: { // Client identifier byte[] id = new byte[optionLen]; clientId = new byte[optionLen]; packet.get(id); packet.get(clientId); expectedLen = optionLen; expectedLen = optionLen; } break; } break; case DHCP_VENDOR_INFO: case DHCP_VENDOR_INFO: Loading Loading
common/moduleutils/src/android/net/shared/Layer2Information.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net.shared; package android.net.shared; import android.annotation.Nullable; import android.net.Layer2InformationParcelable; import android.net.Layer2InformationParcelable; import android.net.MacAddress; import android.net.MacAddress; Loading @@ -23,14 +24,18 @@ import java.util.Objects; /** @hide */ /** @hide */ public class Layer2Information { public class Layer2Information { @Nullable public final String mL2Key; public final String mL2Key; @Nullable public final String mGroupHint; public final String mGroupHint; @Nullable public final MacAddress mBssid; public final MacAddress mBssid; /** /** * Create a Layer2Information with the specified configuration. * Create a Layer2Information with the specified configuration. */ */ public Layer2Information(String l2Key, String groupHint, MacAddress bssid) { public Layer2Information(@Nullable final String l2Key, @Nullable final String groupHint, @Nullable final MacAddress bssid) { mL2Key = l2Key; mL2Key = l2Key; mGroupHint = groupHint; mGroupHint = groupHint; mBssid = bssid; mBssid = bssid; Loading @@ -41,7 +46,7 @@ public class Layer2Information { StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer(); str.append("L2Key: ").append(mL2Key); str.append("L2Key: ").append(mL2Key); str.append(", GroupHint: ").append(mGroupHint); str.append(", GroupHint: ").append(mGroupHint); str.append(", bssid: ").append(mBssid.toString()); str.append(", bssid: ").append(mBssid); return str.toString(); return str.toString(); } } Loading
common/networkstackclient/Android.bp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,13 @@ aidl_interface { "src/android/net/ip/IIpClientCallbacks.aidl", "src/android/net/ip/IIpClientCallbacks.aidl", ], ], backend: { backend: { java: { apex_available: [ "//apex_available:platform", "com.android.bluetooth.updatable", "com.android.wifi", ], }, ndk: { ndk: { enabled: false, enabled: false, }, }, Loading Loading @@ -117,7 +124,7 @@ java_library { ], ], static_libs: [ static_libs: [ "ipmemorystore-aidl-interfaces-V5-java", "ipmemorystore-aidl-interfaces-V5-java", "networkstack-aidl-interfaces-unstable-java", "networkstack-aidl-interfaces-java", ], ], visibility: [ visibility: [ "//frameworks/base/packages/Tethering", "//frameworks/base/packages/Tethering", Loading
res/values-mcc460/config.xml +12 −0 Original line number Original line Diff line number Diff line Loading @@ -5,7 +5,19 @@ general case as this could degrade the user experience (portals not detected properly). general case as this could degrade the user experience (portals not detected properly). However in China the default URLs are not accessible in general. The below alternatives However in China the default URLs are not accessible in general. The below alternatives should allow users to connect to local networks normally. --> should allow users to connect to local networks normally. --> <!-- default_captive_portal_https_url is not configured as overlayable so OEMs that wish to change captive_portal_https_url configuration must do so via configuring runtime resource overlay to config_captive_portal_https_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string> <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string> <!-- default_captive_portal_fallback_urls is not configured as overlayable so OEMs that wish to change captive_portal_fallback_urls configuration must do so via configuring runtime resource overlay to config_captive_portal_fallback_urls and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <item>http://www.googleapis.cn/generate_204</item> <item>http://www.googleapis.cn/generate_204</item> </string-array> </string-array> Loading
res/values/config.xml +20 −12 Original line number Original line Diff line number Diff line Loading @@ -6,28 +6,34 @@ The overlays must apply to the config_* values, not the default_* values. The default_* The overlays must apply to the config_* values, not the default_* values. The default_* values are meant to be the default when no other configuration is specified. values are meant to be the default when no other configuration is specified. --> --> <!-- DNS probe timeout for network validation. Enough for 3 DNS queries 5 seconds apart. --> <integer name="default_captive_portal_dns_probe_timeout">12500</integer> <!-- HTTP URL for network validation, to use for detecting captive portals. --> <!-- HTTP URL for network validation, to use for detecting captive portals. --> <!-- default_captive_portal_http_url is not configured as overlayable so OEMs that wish to change captive_portal_http_url configuration must do so via configuring runtime resource overlay to config_captive_portal_http_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> <!-- HTTPS URL for network validation, to use for confirming internet connectivity. --> <!-- HTTPS URL for network validation, to use for confirming internet connectivity. --> <!-- default_captive_portal_https_url is not configured as overlayable so OEMs that wish to change captive_portal_https_url configuration must do so via configuring runtime resource overlay to config_captive_portal_https_url and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> <!-- List of fallback URLs to use for detecting captive portals. --> <!-- List of fallback URLs to use for detecting captive portals. --> <!-- default_captive_portal_fallback_urls is not configured as overlayable so OEMs that wish to change captive_portal_fallback_urls configuration must do so via configuring runtime resource overlay to config_captive_portal_fallback_urls and *NOT* by changing or overlaying this resource. It will break if the enforcement of overlayable starts. --> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <string-array name="default_captive_portal_fallback_urls" translatable="false"> <item>http://www.google.com/gen_204</item> <item>http://www.google.com/gen_204</item> <item>http://play.googleapis.com/generate_204</item> <item>http://play.googleapis.com/generate_204</item> </string-array> </string-array> <!-- List of fallback probe specs to use for detecting captive portals. This is an alternative to fallback URLs that provides more flexibility on detection rules. Empty, so unused by default. --> <string-array name="default_captive_portal_fallback_probe_specs" translatable="false"> </string-array> <!-- Configuration hooks for the above settings. <!-- Configuration hooks for the above settings. Empty by default but may be overridden by RROs. --> Empty by default but may be overridden by RROs. --> <integer name="config_captive_portal_dns_probe_timeout"></integer> <integer name="config_captive_portal_dns_probe_timeout"></integer> Loading @@ -35,6 +41,8 @@ <string name="config_captive_portal_http_url" translatable="false"></string> <string name="config_captive_portal_http_url" translatable="false"></string> <!--suppress CheckTagEmptyBody: overlayable resource to use as configuration hook --> <!--suppress CheckTagEmptyBody: overlayable resource to use as configuration hook --> <string name="config_captive_portal_https_url" translatable="false"></string> <string name="config_captive_portal_https_url" translatable="false"></string> <!-- Literal commas are not allowed in the url configuration because they are used as a separator internally. --> <string-array name="config_captive_portal_fallback_urls" translatable="false"> <string-array name="config_captive_portal_fallback_urls" translatable="false"> </string-array> </string-array> <string-array name="config_captive_portal_fallback_probe_specs" translatable="false"> <string-array name="config_captive_portal_fallback_probe_specs" translatable="false"> Loading
src/android/net/dhcp/DhcpPacket.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1182,8 +1182,8 @@ public abstract class DhcpPacket { vendorId = readAsciiString(packet, optionLen, true); vendorId = readAsciiString(packet, optionLen, true); break; break; case DHCP_CLIENT_IDENTIFIER: { // Client identifier case DHCP_CLIENT_IDENTIFIER: { // Client identifier byte[] id = new byte[optionLen]; clientId = new byte[optionLen]; packet.get(id); packet.get(clientId); expectedLen = optionLen; expectedLen = optionLen; } break; } break; case DHCP_VENDOR_INFO: case DHCP_VENDOR_INFO: Loading