From ef0aa6f9e5718942a93c69bbe6be21bf6c0fa532 Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Tue, 31 Mar 2020 15:39:52 +0000 Subject: 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 --- common/networkstackclient/Android.bp | 1 + .../android/net/Layer2InformationParcelable.aidl | 23 ++++++++++++++++++++ .../current/android/net/ip/IIpClient.aidl | 1 + .../android/net/Layer2InformationParcelable.aidl | 25 ++++++++++++++++++++++ .../src/android/net/ip/IIpClient.aidl | 2 ++ 5 files changed, 52 insertions(+) create mode 100644 common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/Layer2InformationParcelable.aidl create mode 100644 common/networkstackclient/src/android/net/Layer2InformationParcelable.aidl (limited to 'common/networkstackclient') diff --git a/common/networkstackclient/Android.bp b/common/networkstackclient/Android.bp index 0965eb9..9081af4 100644 --- a/common/networkstackclient/Android.bp +++ b/common/networkstackclient/Android.bp @@ -62,6 +62,7 @@ aidl_interface { "src/android/net/INetworkStackStatusCallback.aidl", "src/android/net/InitialConfigurationParcelable.aidl", "src/android/net/InformationElementParcelable.aidl", + "src/android/net/Layer2InformationParcelable.aidl", "src/android/net/Layer2PacketParcelable.aidl", "src/android/net/NattKeepalivePacketDataParcelable.aidl", "src/android/net/PrivateDnsConfigParcel.aidl", diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/Layer2InformationParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/Layer2InformationParcelable.aidl new file mode 100644 index 0000000..c733188 --- /dev/null +++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/Layer2InformationParcelable.aidl @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL interface (or parcelable). Do not try to +// edit this file. It looks like you are doing that because you have modified +// an AIDL interface in a backward-incompatible way, e.g., deleting a function +// from an interface or a field from a parcelable and it broke the build. That +// breakage is intended. +// +// You must not make a backward incompatible changes to the AIDL files built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.net; +parcelable Layer2InformationParcelable { + String l2Key; + String groupHint; + android.net.MacAddress bssid; +} diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl index 250f855..6c2d86b 100644 --- a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl +++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl @@ -32,4 +32,5 @@ interface IIpClient { oneway void setL2KeyAndGroupHint(in String l2Key, in String groupHint); oneway void addNattKeepalivePacketFilter(int slot, in android.net.NattKeepalivePacketDataParcelable pkt); oneway void notifyPreconnectionComplete(boolean success); + oneway void updateLayer2Information(in android.net.Layer2InformationParcelable info); } diff --git a/common/networkstackclient/src/android/net/Layer2InformationParcelable.aidl b/common/networkstackclient/src/android/net/Layer2InformationParcelable.aidl new file mode 100644 index 0000000..496d291 --- /dev/null +++ b/common/networkstackclient/src/android/net/Layer2InformationParcelable.aidl @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net; + +import android.net.MacAddress; + +parcelable Layer2InformationParcelable { + String l2Key; + String groupHint; + MacAddress bssid; +} diff --git a/common/networkstackclient/src/android/net/ip/IIpClient.aidl b/common/networkstackclient/src/android/net/ip/IIpClient.aidl index ad94aee..0027949 100644 --- a/common/networkstackclient/src/android/net/ip/IIpClient.aidl +++ b/common/networkstackclient/src/android/net/ip/IIpClient.aidl @@ -15,6 +15,7 @@ */ package android.net.ip; +import android.net.Layer2InformationParcelable; import android.net.ProxyInfo; import android.net.ProvisioningConfigurationParcelable; import android.net.NattKeepalivePacketDataParcelable; @@ -36,4 +37,5 @@ oneway interface IIpClient { void setL2KeyAndGroupHint(in String l2Key, in String groupHint); void addNattKeepalivePacketFilter(int slot, in NattKeepalivePacketDataParcelable pkt); void notifyPreconnectionComplete(boolean success); + void updateLayer2Information(in Layer2InformationParcelable info); } -- cgit v1.2.3