Loading apishim/29/com/android/networkstack/apishim/api29/NetworkInformationShimImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import androidx.annotation.VisibleForTesting; import com.android.networkstack.apishim.CaptivePortalDataShim; import com.android.networkstack.apishim.NetworkInformationShim; import java.net.Inet4Address; /** * Compatibility implementation of {@link NetworkInformationShim}. * Loading Loading @@ -84,4 +86,10 @@ public class NetworkInformationShimImpl implements NetworkInformationShim { public LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull final LinkProperties lp) { return new LinkProperties(lp); } @Override public void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress) { // Not supported on this API level: no-op } } apishim/30/com/android/networkstack/apishim/NetworkInformationShimImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import java.net.Inet4Address; /** * Compatibility implementation of {@link NetworkInformationShim}. */ Loading Loading @@ -81,4 +83,10 @@ public class NetworkInformationShimImpl extends public LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull final LinkProperties lp) { return lp.makeSensitiveFieldsParcelingCopy(); } @Override public void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress) { lp.setDhcpServerAddress(serverAddress); } } apishim/common/com/android/networkstack/apishim/NetworkInformationShim.java +10 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.net.Inet4Address; /** * Compatibility interface for network info classes such as {@link LinkProperties} and * {@link NetworkCapabilities}. Loading Loading @@ -56,4 +58,12 @@ public interface NetworkInformationShim { */ @NonNull LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull LinkProperties lp); /** * @see LinkProperties#setDhcpServerAddress() */ @NonNull void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress); } res/drawable/icon_wifi.xml +8 −11 Original line number Diff line number Diff line Loading @@ -14,14 +14,11 @@ Copyright (C) 2020 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="26.0dp" android:height="24.0dp" android:viewportWidth="26.0" android:viewportHeight="24.0"> android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#4DFFFFFF" android:pathData="M19.1,14l-3.4,0l0,-1.5c0,-1.8 0.8,-2.8 1.5,-3.4C18.1,8.3 19.200001,8 20.6,8c1.2,0 2.3,0.3 3.1,0.8l1.9,-2.3C25.1,6.1 20.299999,2.1 13,2.1S0.9,6.1 0.4,6.5L13,22l0,0l0,0l0,0l0,0l6.5,-8.1L19.1,14z"/> <path android:fillColor="#FFFFFFFF" android:pathData="M19.5,17.799999c0,-0.8 0.1,-1.3 0.2,-1.6c0.2,-0.3 0.5,-0.7 1.1,-1.2c0.4,-0.4 0.7,-0.8 1,-1.1s0.4,-0.8 0.4,-1.2c0,-0.5 -0.1,-0.9 -0.4,-1.2c-0.3,-0.3 -0.7,-0.4 -1.2,-0.4c-0.4,0 -0.8,0.1 -1.1,0.3c-0.3,0.2 -0.4,0.6 -0.4,1.1l-1.9,0c0,-1 0.3,-1.7 1,-2.2c0.6,-0.5 1.5,-0.8 2.5,-0.8c1.1,0 2,0.3 2.6,0.8c0.6,0.5 0.9,1.3 0.9,2.3c0,0.7 -0.2,1.3 -0.6,1.8c-0.4,0.6 -0.9,1.1 -1.5,1.6c-0.3,0.3 -0.5,0.5 -0.6,0.7c-0.1,0.2 -0.1,0.6 -0.1,1L19.5,17.700001zM21.4,21l-1.9,0l0,-1.8l1.9,0L21.4,21z"/> android:fillColor="@android:color/white" android:pathData="M24,7.39L12,22L0,7.39C2.97,4.08,7.25,2,12,2S21.03,4.08,24,7.39z" /> </vector> src/android/net/ip/IpClient.java +5 −0 Original line number Diff line number Diff line Loading @@ -1211,6 +1211,10 @@ public class IpClient extends StateMachine { newLp.setMtu(mDhcpResults.mtu); } if (mDhcpResults.serverAddress != null) { mShim.setDhcpServerAddress(newLp, mDhcpResults.serverAddress); } final String capportUrl = mDhcpResults.captivePortalApiUrl; // Uri.parse does no syntax check; do a simple regex check to eliminate garbage. // If the URL is still incorrect data fetching will fail later, which is fine. Loading Loading @@ -1343,6 +1347,7 @@ public class IpClient extends StateMachine { if (DBG) { Log.d(mTag, "onNewDhcpResults(" + Objects.toString(mDhcpResults) + ")"); Log.d(mTag, "handleIPv4Success newLp{" + newLp + "}"); } mCallback.onNewDhcpResults(mDhcpResults); maybeSaveNetworkToIpMemoryStore(); Loading Loading
apishim/29/com/android/networkstack/apishim/api29/NetworkInformationShimImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import androidx.annotation.VisibleForTesting; import com.android.networkstack.apishim.CaptivePortalDataShim; import com.android.networkstack.apishim.NetworkInformationShim; import java.net.Inet4Address; /** * Compatibility implementation of {@link NetworkInformationShim}. * Loading Loading @@ -84,4 +86,10 @@ public class NetworkInformationShimImpl implements NetworkInformationShim { public LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull final LinkProperties lp) { return new LinkProperties(lp); } @Override public void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress) { // Not supported on this API level: no-op } }
apishim/30/com/android/networkstack/apishim/NetworkInformationShimImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import java.net.Inet4Address; /** * Compatibility implementation of {@link NetworkInformationShim}. */ Loading Loading @@ -81,4 +83,10 @@ public class NetworkInformationShimImpl extends public LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull final LinkProperties lp) { return lp.makeSensitiveFieldsParcelingCopy(); } @Override public void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress) { lp.setDhcpServerAddress(serverAddress); } }
apishim/common/com/android/networkstack/apishim/NetworkInformationShim.java +10 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.net.Inet4Address; /** * Compatibility interface for network info classes such as {@link LinkProperties} and * {@link NetworkCapabilities}. Loading Loading @@ -56,4 +58,12 @@ public interface NetworkInformationShim { */ @NonNull LinkProperties makeSensitiveFieldsParcelingCopy(@NonNull LinkProperties lp); /** * @see LinkProperties#setDhcpServerAddress() */ @NonNull void setDhcpServerAddress(@NonNull LinkProperties lp, @NonNull Inet4Address serverAddress); }
res/drawable/icon_wifi.xml +8 −11 Original line number Diff line number Diff line Loading @@ -14,14 +14,11 @@ Copyright (C) 2020 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="26.0dp" android:height="24.0dp" android:viewportWidth="26.0" android:viewportHeight="24.0"> android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#4DFFFFFF" android:pathData="M19.1,14l-3.4,0l0,-1.5c0,-1.8 0.8,-2.8 1.5,-3.4C18.1,8.3 19.200001,8 20.6,8c1.2,0 2.3,0.3 3.1,0.8l1.9,-2.3C25.1,6.1 20.299999,2.1 13,2.1S0.9,6.1 0.4,6.5L13,22l0,0l0,0l0,0l0,0l6.5,-8.1L19.1,14z"/> <path android:fillColor="#FFFFFFFF" android:pathData="M19.5,17.799999c0,-0.8 0.1,-1.3 0.2,-1.6c0.2,-0.3 0.5,-0.7 1.1,-1.2c0.4,-0.4 0.7,-0.8 1,-1.1s0.4,-0.8 0.4,-1.2c0,-0.5 -0.1,-0.9 -0.4,-1.2c-0.3,-0.3 -0.7,-0.4 -1.2,-0.4c-0.4,0 -0.8,0.1 -1.1,0.3c-0.3,0.2 -0.4,0.6 -0.4,1.1l-1.9,0c0,-1 0.3,-1.7 1,-2.2c0.6,-0.5 1.5,-0.8 2.5,-0.8c1.1,0 2,0.3 2.6,0.8c0.6,0.5 0.9,1.3 0.9,2.3c0,0.7 -0.2,1.3 -0.6,1.8c-0.4,0.6 -0.9,1.1 -1.5,1.6c-0.3,0.3 -0.5,0.5 -0.6,0.7c-0.1,0.2 -0.1,0.6 -0.1,1L19.5,17.700001zM21.4,21l-1.9,0l0,-1.8l1.9,0L21.4,21z"/> android:fillColor="@android:color/white" android:pathData="M24,7.39L12,22L0,7.39C2.97,4.08,7.25,2,12,2S21.03,4.08,24,7.39z" /> </vector>
src/android/net/ip/IpClient.java +5 −0 Original line number Diff line number Diff line Loading @@ -1211,6 +1211,10 @@ public class IpClient extends StateMachine { newLp.setMtu(mDhcpResults.mtu); } if (mDhcpResults.serverAddress != null) { mShim.setDhcpServerAddress(newLp, mDhcpResults.serverAddress); } final String capportUrl = mDhcpResults.captivePortalApiUrl; // Uri.parse does no syntax check; do a simple regex check to eliminate garbage. // If the URL is still incorrect data fetching will fail later, which is fine. Loading Loading @@ -1343,6 +1347,7 @@ public class IpClient extends StateMachine { if (DBG) { Log.d(mTag, "onNewDhcpResults(" + Objects.toString(mDhcpResults) + ")"); Log.d(mTag, "handleIPv4Success newLp{" + newLp + "}"); } mCallback.onNewDhcpResults(mDhcpResults); maybeSaveNetworkToIpMemoryStore(); Loading