Merge "Freeze the networkstack-aidl-interfaces interface"
am: 950767f9f9
Change-Id: I32e335756927110e3200f002d32f9e1e8acfd779
This commit is contained in:
@@ -647,4 +647,9 @@ public class DhcpServer extends IDhcpServer.Stub {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,6 +557,11 @@ public class IpClient extends StateMachine {
|
||||
checkNetworkStackCallingPermission();
|
||||
IpClient.this.removeKeepalivePacketFilter(slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
public String getInterfaceName() {
|
||||
|
||||
@@ -251,6 +251,11 @@ public class NetworkStackService extends Service {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
private static class NetworkMonitorImpl extends INetworkMonitor.Stub {
|
||||
@@ -325,5 +330,10 @@ public class NetworkStackService extends Service {
|
||||
checkNetworkStackCallingPermission();
|
||||
mNm.notifyNetworkCapabilitiesChanged(nc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,4 +494,9 @@ public class IpMemoryStoreService extends IIpMemoryStore.Stub {
|
||||
listener.onComplete(makeStatus(ERROR_INTERNAL_INTERRUPTED));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,11 @@ public final class RegularMaintenanceJobService extends JobService {
|
||||
jobFinished(params, !result.isSuccess());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
|
||||
@@ -133,6 +133,11 @@ public class DhcpServerTest {
|
||||
public void onStatusAvailable(int statusCode) {
|
||||
assertEquals(STATUS_SUCCESS, statusCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
|
||||
@Before
|
||||
|
||||
@@ -136,6 +136,11 @@ public class IpMemoryStoreServiceTest {
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -156,6 +161,11 @@ public class IpMemoryStoreServiceTest {
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -178,6 +188,11 @@ public class IpMemoryStoreServiceTest {
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -200,6 +215,11 @@ public class IpMemoryStoreServiceTest {
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -219,6 +239,11 @@ public class IpMemoryStoreServiceTest {
|
||||
public IBinder asBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2818,6 +2818,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
EVENT_PROVISIONING_NOTIFICATION, PROVISIONING_NOTIFICATION_HIDE,
|
||||
mNai.network.netId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean networkRequiresValidation(NetworkAgentInfo nai) {
|
||||
|
||||
@@ -3,8 +3,6 @@ aidl_interface {
|
||||
name: "ipmemorystore-aidl-interfaces",
|
||||
local_include_dir: "java",
|
||||
srcs: [
|
||||
// TODO: Define and use a filegroup for these files, since they're also used in
|
||||
// networkstack-aidl-interfaces. This does not appear to work at the moment.
|
||||
"java/android/net/IIpMemoryStore.aidl",
|
||||
"java/android/net/IIpMemoryStoreCallbacks.aidl",
|
||||
"java/android/net/ipmemorystore/**/*.aidl",
|
||||
@@ -17,17 +15,16 @@ aidl_interface {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
api_dir: "aidl/networkstack",
|
||||
api_dir: "aidl/ipmemorystore",
|
||||
versions: ["1"],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "networkstack-aidl-interfaces",
|
||||
local_include_dir: "java",
|
||||
include_dirs: ["frameworks/base/core/java"], // For framework parcelables.
|
||||
include_dirs: ["frameworks/base/core/java"], // For framework parcelables.
|
||||
srcs: [
|
||||
"java/android/net/DhcpResultsParcelable.aidl",
|
||||
"java/android/net/IIpMemoryStore.aidl",
|
||||
"java/android/net/IIpMemoryStoreCallbacks.aidl",
|
||||
"java/android/net/INetworkMonitor.aidl",
|
||||
"java/android/net/INetworkMonitorCallbacks.aidl",
|
||||
"java/android/net/INetworkStackConnector.aidl",
|
||||
@@ -41,7 +38,6 @@ aidl_interface {
|
||||
"java/android/net/dhcp/IDhcpServerCallbacks.aidl",
|
||||
"java/android/net/ip/IIpClient.aidl",
|
||||
"java/android/net/ip/IIpClientCallbacks.aidl",
|
||||
"java/android/net/ipmemorystore/**/*.aidl",
|
||||
],
|
||||
backend: {
|
||||
ndk: {
|
||||
@@ -52,6 +48,8 @@ aidl_interface {
|
||||
},
|
||||
},
|
||||
api_dir: "aidl/networkstack",
|
||||
imports: ["ipmemorystore-aidl-interfaces"],
|
||||
versions: ["1"],
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
@@ -62,7 +60,7 @@ java_library_static {
|
||||
"ipmemorystore-client",
|
||||
"netd_aidl_interface-java",
|
||||
"networkstack-aidl-interfaces-java",
|
||||
]
|
||||
],
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
@@ -75,7 +73,7 @@ java_library_static {
|
||||
],
|
||||
static_libs: [
|
||||
"ipmemorystore-aidl-interfaces-java",
|
||||
]
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package android.net;
|
||||
interface IIpMemoryStore {
|
||||
oneway void storeNetworkAttributes(String l2Key, in android.net.ipmemorystore.NetworkAttributesParcelable attributes, android.net.ipmemorystore.IOnStatusListener listener);
|
||||
oneway void storeBlob(String l2Key, String clientId, String name, in android.net.ipmemorystore.Blob data, android.net.ipmemorystore.IOnStatusListener listener);
|
||||
oneway void findL2Key(in android.net.ipmemorystore.NetworkAttributesParcelable attributes, android.net.ipmemorystore.IOnL2KeyResponseListener listener);
|
||||
oneway void isSameNetwork(String l2Key1, String l2Key2, android.net.ipmemorystore.IOnSameL3NetworkResponseListener listener);
|
||||
oneway void retrieveNetworkAttributes(String l2Key, android.net.ipmemorystore.IOnNetworkAttributesRetrievedListener listener);
|
||||
oneway void retrieveBlob(String l2Key, String clientId, String name, android.net.ipmemorystore.IOnBlobRetrievedListener listener);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net;
|
||||
interface IIpMemoryStoreCallbacks {
|
||||
oneway void onIpMemoryStoreFetched(in android.net.IIpMemoryStore ipMemoryStore);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
parcelable Blob {
|
||||
byte[] data;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
interface IOnBlobRetrievedListener {
|
||||
oneway void onBlobRetrieved(in android.net.ipmemorystore.StatusParcelable status, in String l2Key, in String name, in android.net.ipmemorystore.Blob data);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
interface IOnL2KeyResponseListener {
|
||||
oneway void onL2KeyResponse(in android.net.ipmemorystore.StatusParcelable status, in String l2Key);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
interface IOnNetworkAttributesRetrievedListener {
|
||||
oneway void onNetworkAttributesRetrieved(in android.net.ipmemorystore.StatusParcelable status, in String l2Key, in android.net.ipmemorystore.NetworkAttributesParcelable attributes);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
interface IOnSameL3NetworkResponseListener {
|
||||
oneway void onSameL3NetworkResponse(in android.net.ipmemorystore.StatusParcelable status, in android.net.ipmemorystore.SameL3NetworkResponseParcelable response);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
interface IOnStatusListener {
|
||||
oneway void onComplete(in android.net.ipmemorystore.StatusParcelable status);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package android.net.ipmemorystore;
|
||||
parcelable NetworkAttributesParcelable {
|
||||
byte[] assignedV4Address;
|
||||
long assignedV4AddressExpiry;
|
||||
String groupHint;
|
||||
android.net.ipmemorystore.Blob[] dnsAddresses;
|
||||
int mtu;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package android.net.ipmemorystore;
|
||||
parcelable SameL3NetworkResponseParcelable {
|
||||
String l2Key1;
|
||||
String l2Key2;
|
||||
float confidence;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.ipmemorystore;
|
||||
parcelable StatusParcelable {
|
||||
int resultCode;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package android.net;
|
||||
parcelable DhcpResultsParcelable {
|
||||
android.net.StaticIpConfiguration baseConfiguration;
|
||||
int leaseDuration;
|
||||
int mtu;
|
||||
String serverAddress;
|
||||
String vendorInfo;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package android.net;
|
||||
interface INetworkMonitor {
|
||||
oneway void start();
|
||||
oneway void launchCaptivePortalApp();
|
||||
oneway void notifyCaptivePortalAppFinished(int response);
|
||||
oneway void setAcceptPartialConnectivity();
|
||||
oneway void forceReevaluation(int uid);
|
||||
oneway void notifyPrivateDnsChanged(in android.net.PrivateDnsConfigParcel config);
|
||||
oneway void notifyDnsResponse(int returnCode);
|
||||
oneway void notifyNetworkConnected(in android.net.LinkProperties lp, in android.net.NetworkCapabilities nc);
|
||||
oneway void notifyNetworkDisconnected();
|
||||
oneway void notifyLinkPropertiesChanged(in android.net.LinkProperties lp);
|
||||
oneway void notifyNetworkCapabilitiesChanged(in android.net.NetworkCapabilities nc);
|
||||
const int NETWORK_TEST_RESULT_VALID = 0;
|
||||
const int NETWORK_TEST_RESULT_INVALID = 1;
|
||||
const int NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY = 2;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package android.net;
|
||||
interface INetworkMonitorCallbacks {
|
||||
oneway void onNetworkMonitorCreated(in android.net.INetworkMonitor networkMonitor);
|
||||
oneway void notifyNetworkTested(int testResult, @nullable String redirectUrl);
|
||||
oneway void notifyPrivateDnsConfigResolved(in android.net.PrivateDnsConfigParcel config);
|
||||
oneway void showProvisioningNotification(String action, String packageName);
|
||||
oneway void hideProvisioningNotification();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package android.net;
|
||||
interface INetworkStackConnector {
|
||||
oneway void makeDhcpServer(in String ifName, in android.net.dhcp.DhcpServingParamsParcel params, in android.net.dhcp.IDhcpServerCallbacks cb);
|
||||
oneway void makeNetworkMonitor(in android.net.Network network, String name, in android.net.INetworkMonitorCallbacks cb);
|
||||
oneway void makeIpClient(in String ifName, in android.net.ip.IIpClientCallbacks callbacks);
|
||||
oneway void fetchIpMemoryStore(in android.net.IIpMemoryStoreCallbacks cb);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net;
|
||||
interface INetworkStackStatusCallback {
|
||||
oneway void onStatusAvailable(int statusCode);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package android.net;
|
||||
parcelable InitialConfigurationParcelable {
|
||||
android.net.LinkAddress[] ipAddresses;
|
||||
android.net.IpPrefix[] directlyConnectedRoutes;
|
||||
String[] dnsServers;
|
||||
String gateway;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package android.net;
|
||||
parcelable PrivateDnsConfigParcel {
|
||||
String hostname;
|
||||
String[] ips;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package android.net;
|
||||
parcelable ProvisioningConfigurationParcelable {
|
||||
boolean enableIPv4;
|
||||
boolean enableIPv6;
|
||||
boolean usingMultinetworkPolicyTracker;
|
||||
boolean usingIpReachabilityMonitor;
|
||||
int requestedPreDhcpActionMs;
|
||||
android.net.InitialConfigurationParcelable initialConfig;
|
||||
android.net.StaticIpConfiguration staticIpConfig;
|
||||
android.net.apf.ApfCapabilities apfCapabilities;
|
||||
int provisioningTimeoutMs;
|
||||
int ipv6AddrGenMode;
|
||||
android.net.Network network;
|
||||
String displayName;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package android.net;
|
||||
parcelable TcpKeepalivePacketDataParcelable {
|
||||
byte[] srcAddress;
|
||||
int srcPort;
|
||||
byte[] dstAddress;
|
||||
int dstPort;
|
||||
int seq;
|
||||
int ack;
|
||||
int rcvWnd;
|
||||
int rcvWndScale;
|
||||
int tos;
|
||||
int ttl;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package android.net.dhcp;
|
||||
parcelable DhcpServingParamsParcel {
|
||||
int serverAddr;
|
||||
int serverAddrPrefixLength;
|
||||
int[] defaultRouters;
|
||||
int[] dnsServers;
|
||||
int[] excludedAddrs;
|
||||
long dhcpLeaseTimeSecs;
|
||||
int linkMtu;
|
||||
boolean metered;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package android.net.dhcp;
|
||||
interface IDhcpServer {
|
||||
oneway void start(in android.net.INetworkStackStatusCallback cb);
|
||||
oneway void updateParams(in android.net.dhcp.DhcpServingParamsParcel params, in android.net.INetworkStackStatusCallback cb);
|
||||
oneway void stop(in android.net.INetworkStackStatusCallback cb);
|
||||
const int STATUS_UNKNOWN = 0;
|
||||
const int STATUS_SUCCESS = 1;
|
||||
const int STATUS_INVALID_ARGUMENT = 2;
|
||||
const int STATUS_UNKNOWN_ERROR = 3;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.net.dhcp;
|
||||
interface IDhcpServerCallbacks {
|
||||
oneway void onDhcpServerCreated(int statusCode, in android.net.dhcp.IDhcpServer server);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package android.net.ip;
|
||||
interface IIpClient {
|
||||
oneway void completedPreDhcpAction();
|
||||
oneway void confirmConfiguration();
|
||||
oneway void readPacketFilterComplete(in byte[] data);
|
||||
oneway void shutdown();
|
||||
oneway void startProvisioning(in android.net.ProvisioningConfigurationParcelable req);
|
||||
oneway void stop();
|
||||
oneway void setTcpBufferSizes(in String tcpBufferSizes);
|
||||
oneway void setHttpProxy(in android.net.ProxyInfo proxyInfo);
|
||||
oneway void setMulticastFilter(boolean enabled);
|
||||
oneway void addKeepalivePacketFilter(int slot, in android.net.TcpKeepalivePacketDataParcelable pkt);
|
||||
oneway void removeKeepalivePacketFilter(int slot);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package android.net.ip;
|
||||
interface IIpClientCallbacks {
|
||||
oneway void onIpClientCreated(in android.net.ip.IIpClient ipClient);
|
||||
oneway void onPreDhcpAction();
|
||||
oneway void onPostDhcpAction();
|
||||
oneway void onNewDhcpResults(in android.net.DhcpResultsParcelable dhcpResults);
|
||||
oneway void onProvisioningSuccess(in android.net.LinkProperties newLp);
|
||||
oneway void onProvisioningFailure(in android.net.LinkProperties newLp);
|
||||
oneway void onLinkPropertiesChange(in android.net.LinkProperties newLp);
|
||||
oneway void onReachabilityLost(in String logMsg);
|
||||
oneway void onQuit();
|
||||
oneway void installPacketFilter(in byte[] filter);
|
||||
oneway void startReadPacketFilter();
|
||||
oneway void setFallbackMulticastFilter(boolean enabled);
|
||||
oneway void setNeighborDiscoveryOffload(boolean enable);
|
||||
}
|
||||
@@ -41,6 +41,11 @@ public class IpMemoryStore extends IpMemoryStoreClient {
|
||||
public void onIpMemoryStoreFetched(final IIpMemoryStore memoryStore) {
|
||||
mService.complete(memoryStore);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +175,11 @@ public class IpClientUtil {
|
||||
public void setNeighborDiscoveryOffload(boolean enable) {
|
||||
mCb.setNeighborDiscoveryOffload(enable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -277,6 +277,11 @@ public class IpServer extends StateMachine {
|
||||
}
|
||||
|
||||
public abstract void callback(int statusCode);
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
private class DhcpServerCallbacksImpl extends DhcpServerCallbacks {
|
||||
|
||||
@@ -40,6 +40,11 @@ public interface OnBlobRetrievedListener {
|
||||
listener.onBlobRetrieved(new Status(statusParcelable), l2Key, name, blob);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ public interface OnL2KeyResponseListener {
|
||||
listener.onL2KeyResponse(new Status(statusParcelable), l2Key);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ public interface OnNetworkAttributesRetrievedListener {
|
||||
new NetworkAttributes(networkAttributesParcelable));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ public interface OnSameL3NetworkResponseListener {
|
||||
new SameL3NetworkResponse(sameL3NetworkResponseParcelable));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,11 @@ public interface OnStatusListener {
|
||||
listener.onComplete(new Status(statusParcelable));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterfaceVersion() {
|
||||
return this.VERSION;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user