summaryrefslogtreecommitdiff
path: root/src/android/net/ip/IpClient.java
diff options
context:
space:
mode:
authorXiao Ma <xiaom@google.com>2020-03-31 15:39:52 +0000
committerXiao Ma <xiaom@google.com>2020-04-02 10:25:22 +0000
commitef0aa6f9e5718942a93c69bbe6be21bf6c0fa532 (patch)
tree269f14da0f638260002b69de8e04ce08e6b5d8b6 /src/android/net/ip/IpClient.java
parent9b105a99a3223fe2b573533cba503fb63bd97257 (diff)
Add new method to update Layer2 information when L2 roaming happens.
This change adds an new method updateLayer2Information in IIpClient.aidl to update layer2 info (e.g. bssid, l2key and grouphint) to detect whether L2 roaming happens or not. Bug: 131797393 Test: atest NetworkStackTests FrameworksNetTests Merged-In: I85eabccb6f5d5f322c8e3df556ceef6647616f5a (cherry picked from commit 3168e392320087c51a677b4d14e783c853ac652d) Change-Id: Ife93fd162803ae89fa85905b45a4bb1cfb5e7e43
Diffstat (limited to 'src/android/net/ip/IpClient.java')
-rw-r--r--src/android/net/ip/IpClient.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/android/net/ip/IpClient.java b/src/android/net/ip/IpClient.java
index ebb31c6..bb5565d 100644
--- a/src/android/net/ip/IpClient.java
+++ b/src/android/net/ip/IpClient.java
@@ -28,6 +28,7 @@ import android.net.ConnectivityManager;
import android.net.DhcpResults;
import android.net.INetd;
import android.net.IpPrefix;
+import android.net.Layer2InformationParcelable;
import android.net.Layer2PacketParcelable;
import android.net.LinkAddress;
import android.net.LinkProperties;
@@ -705,6 +706,12 @@ public class IpClient extends StateMachine {
}
@Override
+ public void updateLayer2Information(Layer2InformationParcelable info) {
+ enforceNetworkStackCallingPermission();
+ IpClient.this.updateLayer2Information(info);
+ }
+
+ @Override
public int getInterfaceVersion() {
return this.VERSION;
}
@@ -878,6 +885,13 @@ public class IpClient extends StateMachine {
}
/**
+ * Update the network bssid, L2Key and GroupHint layer2 information.
+ */
+ public void updateLayer2Information(@NonNull Layer2InformationParcelable info) {
+ // TODO: add specific implementation.
+ }
+
+ /**
* Dump logs of this IpClient.
*/
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {