CaptivePortal: implement setDelegateUid API.

This API is designed to set the UID of the app that is allowed to
perform network traffic for captive protal login, communication will
bypass network access restrictions such as VPNs and private DNS settings
when a portal page is launched by Android Custom Tabs and bind the
upcoming traffic to that portal network.

Bug: 373773542
Test: atest ConnectivityCoverageTests
Change-Id: I9992671634b8e88f5a647455811a6157fb15a44b
This commit is contained in:
Patrick Rohr 2024-12-05 04:06:53 +00:00 • committed by Xiao Ma
commit 7d6dfd52b2

View file

@ -19,6 +19,7 @@ package android.net;
import static org.junit.Assert.assertEquals;
import android.os.Build;
import android.os.IBinder;
import android.os.RemoteException;
import androidx.test.filters.SmallTest;
@ -55,6 +56,10 @@ public class CaptivePortalTest {
mCode = request;
}
@Override
public void setDelegateUid(int uid, IBinder binder, IIntResultListener listener) {
}
// This is only @Override on R-
public void logEvent(int eventId, String packageName) throws RemoteException {
mCode = eventId;