Migrate ICaptivePortal to stable AIDL
Also add required API for the captive portal app to stop using hidden members. Test: atest FrameworksNetTests NetworkStackTests Bug: 112869080 Merged-In: I62b457e709fa199822bb8f80b0eab990be4ded93 Change-Id: I62b457e709fa199822bb8f80b0eab990be4ded93
This commit is contained in:
@@ -187,7 +187,6 @@ java_defaults {
|
||||
"core/java/android/hardware/radio/ITunerCallback.aidl",
|
||||
"core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl",
|
||||
"core/java/android/hardware/usb/IUsbManager.aidl",
|
||||
"core/java/android/net/ICaptivePortal.aidl",
|
||||
"core/java/android/net/IConnectivityManager.aidl",
|
||||
"core/java/android/net/IIpConnectivityMetrics.aidl",
|
||||
"core/java/android/net/IEthernetManager.aidl",
|
||||
@@ -826,6 +825,7 @@ aidl_interface {
|
||||
srcs: [
|
||||
"core/java/android/net/ApfCapabilitiesParcelable.aidl",
|
||||
"core/java/android/net/DhcpResultsParcelable.aidl",
|
||||
"core/java/android/net/ICaptivePortal.aidl",
|
||||
"core/java/android/net/INetworkMonitor.aidl",
|
||||
"core/java/android/net/INetworkMonitorCallbacks.aidl",
|
||||
"core/java/android/net/IIpMemoryStore.aidl",
|
||||
|
||||
@@ -3025,6 +3025,8 @@ package android.metrics {
|
||||
package android.net {
|
||||
|
||||
public class CaptivePortal implements android.os.Parcelable {
|
||||
ctor public CaptivePortal(android.os.IBinder);
|
||||
method public void useNetwork();
|
||||
field public static final int APP_RETURN_DISMISSED = 0; // 0x0
|
||||
field public static final int APP_RETURN_UNWANTED = 1; // 0x1
|
||||
field public static final int APP_RETURN_WANTED_AS_IS = 2; // 0x2
|
||||
|
||||
@@ -599,6 +599,8 @@ package android.media.audiofx {
|
||||
package android.net {
|
||||
|
||||
public class CaptivePortal implements android.os.Parcelable {
|
||||
ctor public CaptivePortal(android.os.IBinder);
|
||||
method public void useNetwork();
|
||||
field public static final int APP_RETURN_DISMISSED = 0; // 0x0
|
||||
field public static final int APP_RETURN_UNWANTED = 1; // 0x1
|
||||
field public static final int APP_RETURN_WANTED_AS_IS = 2; // 0x2
|
||||
|
||||
@@ -45,6 +45,8 @@ public class CaptivePortal implements Parcelable {
|
||||
private final IBinder mBinder;
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public CaptivePortal(IBinder binder) {
|
||||
mBinder = binder;
|
||||
}
|
||||
@@ -107,6 +109,8 @@ public class CaptivePortal implements Parcelable {
|
||||
* connectivity for apps because the captive portal is still in place.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public void useNetwork() {
|
||||
try {
|
||||
ICaptivePortal.Stub.asInterface(mBinder).appResponse(APP_RETURN_WANTED_AS_IS);
|
||||
|
||||
@@ -20,7 +20,6 @@ package android.net;
|
||||
* Interface to inform NetworkMonitor of decisions of app handling captive portal.
|
||||
* @hide
|
||||
*/
|
||||
interface ICaptivePortal
|
||||
{
|
||||
oneway void appResponse(int response);
|
||||
oneway interface ICaptivePortal {
|
||||
void appResponse(int response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user