diff options
author | Xiao Ma <xiaom@google.com> | 2020-01-30 17:00:05 +0900 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2020-02-10 21:11:04 +0900 |
commit | c3a28323623f0ff3b98ab15e61141437a0fee90b (patch) | |
tree | 74465ab500597d71c265b40414c54d38fadc66b7 /common/networkstackclient/src/android/net | |
parent | 738b6c361469af87d6eaa20680184bf5ef8dded4 (diff) |
Add ScanResultInfo object in ProvisioningConfiguration parcel.
Since wifi.ScanResult doesn't implement specific equals() yet, for
comparing the ProvisioningConfiguration object better, this change
encapuslates ScanResult#SSID and ScanResult#InformationElement member
into a new class: ScanResultInfo inside ProvisioningConfiguration.
Adding ScanResultInfo object in ProvisioningConfiguration parcelable is
to check the InformationElement filed when starting IpClient and detect
whether or not the specific OUI is included in the IEs.
Bug: 137835398
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: I247ac7f343ef3e99b64b93b45549e2a25980a407
Diffstat (limited to 'common/networkstackclient/src/android/net')
3 files changed, 48 insertions, 0 deletions
diff --git a/common/networkstackclient/src/android/net/InformationElementParcelable.aidl b/common/networkstackclient/src/android/net/InformationElementParcelable.aidl new file mode 100644 index 0000000..c70bf6f --- /dev/null +++ b/common/networkstackclient/src/android/net/InformationElementParcelable.aidl @@ -0,0 +1,22 @@ +/* + * 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; + +parcelable InformationElementParcelable { + int id; + byte[] payload; +} diff --git a/common/networkstackclient/src/android/net/ProvisioningConfigurationParcelable.aidl b/common/networkstackclient/src/android/net/ProvisioningConfigurationParcelable.aidl index 0b6d7d5..9fcb036 100644 --- a/common/networkstackclient/src/android/net/ProvisioningConfigurationParcelable.aidl +++ b/common/networkstackclient/src/android/net/ProvisioningConfigurationParcelable.aidl @@ -19,6 +19,7 @@ package android.net; import android.net.InitialConfigurationParcelable; import android.net.Network; +import android.net.ScanResultInfoParcelable; import android.net.StaticIpConfiguration; import android.net.apf.ApfCapabilities; @@ -36,4 +37,5 @@ parcelable ProvisioningConfigurationParcelable { Network network; String displayName; boolean enablePreconnection; + ScanResultInfoParcelable scanResultInfo; } diff --git a/common/networkstackclient/src/android/net/ScanResultInfoParcelable.aidl b/common/networkstackclient/src/android/net/ScanResultInfoParcelable.aidl new file mode 100644 index 0000000..f5f101d --- /dev/null +++ b/common/networkstackclient/src/android/net/ScanResultInfoParcelable.aidl @@ -0,0 +1,24 @@ +/* + * 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.InformationElementParcelable; + +parcelable ScanResultInfoParcelable { + String ssid; + InformationElementParcelable[] informationElements; +} |