Merge "Revert "Add SPEAKER_CLEANUP system usage"" into main
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 2c21d2e..4300801 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -108,16 +108,13 @@
* Here we focus on specific parameter checking, general IEffect interfaces testing performed in
* VtsAudioEffectTargetTest.
*/
-enum ParamName { PARAM_INSTANCE_NAME, PARAM_LEVEL, PARAM_MUTE };
-using VolumeParamTestParam =
- std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int, bool>;
+enum VolumeLevelParamName { PARAM_INSTANCE_NAME, PARAM_LEVEL };
+using VolumeLevelTestParam = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int>;
-class VolumeParamTest : public ::testing::TestWithParam<VolumeParamTestParam>,
- public VolumeControlHelper {
+class VolumeLevelParamTest : public ::testing::TestWithParam<VolumeLevelTestParam>,
+ public VolumeControlHelper {
public:
- VolumeParamTest()
- : mParamLevel(std::get<PARAM_LEVEL>(GetParam())),
- mParamMute(std::get<PARAM_MUTE>(GetParam())) {
+ VolumeLevelParamTest() : mParamLevel(std::get<PARAM_LEVEL>(GetParam())) {
std::tie(mFactory, mDescriptor) = std::get<PARAM_INSTANCE_NAME>(GetParam());
}
@@ -125,13 +122,31 @@
void TearDown() override { TearDownVolumeControl(); }
int mParamLevel = 0;
- bool mParamMute = false;
};
-TEST_P(VolumeParamTest, SetAndGetParams) {
+TEST_P(VolumeLevelParamTest, SetAndGetParams) {
ASSERT_NO_FATAL_FAILURE(
setAndVerifyParameters(Volume::levelDb, mParamLevel,
isLevelValid(mParamLevel) ? EX_NONE : EX_ILLEGAL_ARGUMENT));
+}
+
+enum VolumeMuteParamName { MUTE_PARAM_INSTANCE_NAME, PARAM_MUTE };
+using VolumeMuteTestParam = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, bool>;
+
+class VolumeMuteParamTest : public ::testing::TestWithParam<VolumeMuteTestParam>,
+ public VolumeControlHelper {
+ public:
+ VolumeMuteParamTest() : mParamMute(std::get<PARAM_MUTE>(GetParam())) {
+ std::tie(mFactory, mDescriptor) = std::get<MUTE_PARAM_INSTANCE_NAME>(GetParam());
+ }
+
+ void SetUp() override { ASSERT_NO_FATAL_FAILURE(SetUpVolumeControl()); }
+ void TearDown() override { TearDownVolumeControl(); }
+
+ bool mParamMute = false;
+};
+
+TEST_P(VolumeMuteParamTest, SetAndGetParams) {
ASSERT_NO_FATAL_FAILURE(setAndVerifyParameters(Volume::mute, mParamMute, EX_NONE));
}
@@ -298,25 +313,40 @@
std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> kDescPair;
INSTANTIATE_TEST_SUITE_P(
- VolumeTest, VolumeParamTest,
+ VolumeTest, VolumeLevelParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidVolume())),
testing::ValuesIn(
EffectHelper::getTestValueSet<Volume, int, Range::volume, Volume::levelDb>(
- kDescPair, EffectHelper::expandTestValueBasic<int>)),
- testing::Bool() /* mute */),
- [](const testing::TestParamInfo<VolumeParamTest::ParamType>& info) {
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ [](const testing::TestParamInfo<VolumeLevelParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string level = std::to_string(std::get<PARAM_LEVEL>(info.param));
- std::string mute = std::to_string(std::get<PARAM_MUTE>(info.param));
- std::string name = getPrefix(descriptor) + "_level" + level + "_mute" + mute;
+ std::string name = getPrefix(descriptor) + "_level" + level;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
});
-GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VolumeParamTest);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VolumeLevelParamTest);
+
+INSTANTIATE_TEST_SUITE_P(
+ VolumeTest, VolumeMuteParamTest,
+ ::testing::Combine(
+ testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidVolume())),
+ testing::Bool() /* mute */),
+ [](const testing::TestParamInfo<VolumeMuteParamTest::ParamType>& info) {
+ auto descriptor = std::get<MUTE_PARAM_INSTANCE_NAME>(info.param).second;
+ std::string mute = std::to_string(std::get<PARAM_MUTE>(info.param));
+ std::string name = getPrefix(descriptor) + "_mute" + mute;
+ std::replace_if(
+ name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
+ return name;
+ });
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VolumeMuteParamTest);
INSTANTIATE_TEST_SUITE_P(VolumeTest, VolumeDataTest,
testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index 768142c..7d76b89 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/1.1/vts/functional/Android.bp b/bluetooth/1.1/vts/functional/Android.bp
index 7f56647..6b3a3e7 100644
--- a/bluetooth/1.1/vts/functional/Android.bp
+++ b/bluetooth/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/aidl/vts/Android.bp b/bluetooth/aidl/vts/Android.bp
index c69ced4..a08bdfc 100644
--- a/bluetooth/aidl/vts/Android.bp
+++ b/bluetooth/aidl/vts/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/audio/2.0/vts/functional/Android.bp b/bluetooth/audio/2.0/vts/functional/Android.bp
index f5cb956..65ad8d0 100644
--- a/bluetooth/audio/2.0/vts/functional/Android.bp
+++ b/bluetooth/audio/2.0/vts/functional/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/audio/2.1/vts/functional/Android.bp b/bluetooth/audio/2.1/vts/functional/Android.bp
index cea7326..de858fc 100644
--- a/bluetooth/audio/2.1/vts/functional/Android.bp
+++ b/bluetooth/audio/2.1/vts/functional/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/audio/aidl/vts/Android.bp b/bluetooth/audio/aidl/vts/Android.bp
index 884062a..b0b095d 100644
--- a/bluetooth/audio/aidl/vts/Android.bp
+++ b/bluetooth/audio/aidl/vts/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_bluetooth",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/bluetooth/finder/aidl/vts/Android.bp b/bluetooth/finder/aidl/vts/Android.bp
index 6b0285e..49d2d45 100644
--- a/bluetooth/finder/aidl/vts/Android.bp
+++ b/bluetooth/finder/aidl/vts/Android.bp
@@ -13,6 +13,7 @@
// limitations under the License.
package {
+ default_team: "trendy_team_bluetooth",
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/bluetooth/lmp_event/aidl/vts/Android.bp b/bluetooth/lmp_event/aidl/vts/Android.bp
index b89351e..a137434 100644
--- a/bluetooth/lmp_event/aidl/vts/Android.bp
+++ b/bluetooth/lmp_event/aidl/vts/Android.bp
@@ -1,5 +1,6 @@
cc_test {
name: "VtsHalLmpEventTargetTest",
+ team: "trendy_team_bluetooth",
defaults: [
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
diff --git a/bluetooth/ranging/aidl/vts/Android.bp b/bluetooth/ranging/aidl/vts/Android.bp
index ead9992..9984ce8 100644
--- a/bluetooth/ranging/aidl/vts/Android.bp
+++ b/bluetooth/ranging/aidl/vts/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_bluetooth",
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index aee1d38..6429246 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -396,7 +396,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.data</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioData</name>
<instance>slot1</instance>
@@ -476,7 +476,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.ims.media</name>
- <version>2</version>
+ <version>2-3</version>
<interface>
<name>IImsMedia</name>
<instance>default</instance>
@@ -676,6 +676,14 @@
<instance>default</instance>
</interface>
</hal>
+ <hal format="aidl" optional="true">
+ <name>android.hardware.tv.mediaquality</name>
+ <version>1</version>
+ <interface>
+ <name>IMediaQuality</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
<!-- The native mapper HAL must exist on the device -->
<hal format="native">
<name>mapper</name>
diff --git a/contexthub/1.0/vts/functional/Android.bp b/contexthub/1.0/vts/functional/Android.bp
index 5949f8d..3bc3597 100644
--- a/contexthub/1.0/vts/functional/Android.bp
+++ b/contexthub/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_context_hub",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/contexthub/1.1/vts/functional/Android.bp b/contexthub/1.1/vts/functional/Android.bp
index b2961c4..5e0779d 100644
--- a/contexthub/1.1/vts/functional/Android.bp
+++ b/contexthub/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_context_hub",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/contexthub/1.2/vts/functional/Android.bp b/contexthub/1.2/vts/functional/Android.bp
index c923f42..cdf348f 100644
--- a/contexthub/1.2/vts/functional/Android.bp
+++ b/contexthub/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_context_hub",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/gatekeeper/aidl/software/file_contexts b/gatekeeper/aidl/software/file_contexts
index 23a62ea..cc4180e 100644
--- a/gatekeeper/aidl/software/file_contexts
+++ b/gatekeeper/aidl/software/file_contexts
@@ -1,3 +1,3 @@
(/.*)? u:object_r:vendor_file:s0
/etc(/.*)? u:object_r:vendor_configs_file:s0
-/bin/hw/android\.hardware\.gatekeeper-service\.nonsecure u:object_r:hal_gatekeeper_remote_exec:s0
+/bin/hw/android\.hardware\.gatekeeper-service\.nonsecure u:object_r:hal_gatekeeper_default_exec:s0
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index 63dca0a..b18d2be 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -39,4 +39,5 @@
ERROR_UNKNOWN = (-1) /* -1 */,
ERROR_INCOMPATIBLE_CABLE = (-2) /* -2 */,
ERROR_TOO_MANY_DISPLAYS = (-3) /* -3 */,
+ ERROR_LINK_UNSTABLE = (-4) /* -4 */,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index b35ada5..c807ffd 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -43,4 +43,11 @@
* displays that can be simultaneously connected
*/
ERROR_TOO_MANY_DISPLAYS = -3,
+
+ /**
+ * Display link is unstable, e.g. link training failure (negotiation
+ * of connection speed failed), and the display needs to be
+ * reconfigured
+ */
+ ERROR_LINK_UNSTABLE = -4,
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index bc27cc7..c71c010 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -97,5 +97,6 @@
const int EX_UNSUPPORTED = 8;
const int EX_SEAMLESS_NOT_ALLOWED = 9;
const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+ const int EX_CONFIG_FAILED = 11;
const int INVALID_CONFIGURATION = 0x7fffffff;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index 213e8e9..9650334 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -93,6 +93,10 @@
* Seamless requirements cannot be met Exception
*/
const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+ /**
+ * Proposed configuration failed for undisclosed reasons
+ */
+ const int EX_CONFIG_FAILED = 11;
/**
* Integer.MAX_VALUE is reserved for the invalid configuration.
@@ -558,6 +562,7 @@
* @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
* @exception EX_BAD_CONFIG when the configuration handle passed in is not valid
* for this display.
+ * @exception EX_CONFIG_FAILED when the config failed for undisclosed reasons.
*/
void setActiveConfig(long display, int config);
@@ -583,6 +588,7 @@
* achieve the vsync period change without a noticeable visual artifact. When the conditions
* change and it may be possible to change the vsync period seamlessly, onSeamlessPossible
* callback must be called to indicate that caller should retry.
+ * @exception EX_CONFIG_FAILED when the config failed for undisclosed reasons.
*
* @return is the timeline for the vsync period change.
*/
diff --git a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
index bdbe4d0..3e2f2ac 100644
--- a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
+++ b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
@@ -753,7 +753,7 @@
* Test IMapper::lock and IMapper::unlock with no CPU usage requested.
*/
TEST_P(GraphicsMapperStableCTests, LockUnlockNoCPUUsage) {
- constexpr auto usage = BufferUsage::CPU_READ_NEVER | BufferUsage::CPU_WRITE_NEVER;
+ constexpr auto usage = BufferUsage::CPU_READ_RARELY | BufferUsage::CPU_WRITE_NEVER;
auto buffer = allocate({
.name = {"VTS_TEMP"},
.width = 64,
@@ -771,15 +771,12 @@
auto handle = buffer->import();
uint8_t* data = nullptr;
- EXPECT_EQ(AIMAPPER_ERROR_BAD_VALUE,
- mapper()->v5.lock(*handle, static_cast<int64_t>(info.usage),
- region, -1,(void**)&data))
- << "Locking with 0 access succeeded";
+ EXPECT_EQ(AIMAPPER_ERROR_BAD_VALUE, mapper()->v5.lock(*handle, 0, region, -1, (void**)&data))
+ << "Locking with 0 access succeeded";
int releaseFence = -1;
- EXPECT_EQ(AIMAPPER_ERROR_BAD_BUFFER,
- mapper()->v5.unlock(*handle, &releaseFence))
- << "Unlocking not locked buffer succeeded";
+ EXPECT_EQ(AIMAPPER_ERROR_BAD_BUFFER, mapper()->v5.unlock(*handle, &releaseFence))
+ << "Unlocking not locked buffer succeeded";
if (releaseFence != -1) {
close(releaseFence);
}
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index f60c484..517ad86 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -105,7 +105,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -320,7 +320,7 @@
stability: "vintf",
imports: [
"android.hardware.radio-V3",
- "android.hardware.radio.data-V3",
+ "android.hardware.radio.data-V4",
],
backend: {
cpp: {
@@ -347,7 +347,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
index 782dbbf..27561b9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
@@ -52,4 +52,6 @@
BIP = (1 << 13) /* 8192 */,
ENTERPRISE = (1 << 14) /* 16384 */,
RCS = (1 << 15) /* 32768 */,
+ OEM_PAID = (1 << 16) /* 65536 */,
+ OEM_PRIVATE = (1 << 17) /* 131072 */,
}
diff --git a/radio/aidl/android/hardware/radio/data/ApnTypes.aidl b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
index 2a0c263..bea8bcf 100644
--- a/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
+++ b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
@@ -91,16 +91,12 @@
* APN type for RCS (Rich Communication Services)
*/
RCS = 1 << 15,
-
/**
* APN type for OEM_PAID networks (Automotive PANS)
*/
- // TODO(b/366194627): enable once HAL unfreezes
- // OEM_PAID = 1 << 16,
-
+ OEM_PAID = 1 << 16,
/**
* APN type for OEM_PRIVATE networks (Automotive PANS)
*/
- // TODO(b/366194627): enable once HAL unfreezes
- // OEM_PRIVATE = 1 << 17,
+ OEM_PRIVATE = 1 << 17,
}
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index 569dd1e..3fbd398 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -26,9 +26,9 @@
name: "android.hardware.radio-library.aidl_deps",
shared_libs: [
"android.hardware.radio.config-V3-ndk",
- "android.hardware.radio.data-V3-ndk",
+ "android.hardware.radio.data-V4-ndk",
"android.hardware.radio.ims-V2-ndk",
- "android.hardware.radio.ims.media-V2-ndk",
+ "android.hardware.radio.ims.media-V3-ndk",
"android.hardware.radio.messaging-V3-ndk",
"android.hardware.radio.modem-V3-ndk",
"android.hardware.radio.network-V3-ndk",
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index 9521068..37e0ba8 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -79,9 +79,9 @@
static_libs: [
"android.hardware.radio-V3-ndk",
"android.hardware.radio.config-V3-ndk",
- "android.hardware.radio.data-V3-ndk",
+ "android.hardware.radio.data-V4-ndk",
"android.hardware.radio.ims-V2-ndk",
- "android.hardware.radio.ims.media-V2-ndk",
+ "android.hardware.radio.ims.media-V3-ndk",
"android.hardware.radio.messaging-V3-ndk",
"android.hardware.radio.modem-V3-ndk",
"android.hardware.radio.network-V3-ndk",
diff --git a/security/keymint/aidl/default/file_contexts b/security/keymint/aidl/default/file_contexts
index dce7e3c..41b02d5 100644
--- a/security/keymint/aidl/default/file_contexts
+++ b/security/keymint/aidl/default/file_contexts
@@ -1,3 +1,3 @@
(/.*)? u:object_r:vendor_file:s0
/etc(/.*)? u:object_r:vendor_configs_file:s0
-/bin/hw/android\.hardware\.security\.keymint-service\.nonsecure u:object_r:hal_keymint_rust_exec:s0
+/bin/hw/android\.hardware\.security\.keymint-service\.nonsecure u:object_r:hal_keymint_default_exec:s0
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index d53179a..b042907 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_sensors",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/sensors/2.0/vts/functional/Android.bp b/sensors/2.0/vts/functional/Android.bp
index 62eaf6b..a62a0e7 100644
--- a/sensors/2.0/vts/functional/Android.bp
+++ b/sensors/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_sensors",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/sensors/2.1/vts/functional/Android.bp b/sensors/2.1/vts/functional/Android.bp
index 61cfd14..e8777e5 100644
--- a/sensors/2.1/vts/functional/Android.bp
+++ b/sensors/2.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_sensors",
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/tv/mediaquality/OWNERS b/tv/mediaquality/OWNERS
new file mode 100644
index 0000000..35ca732
--- /dev/null
+++ b/tv/mediaquality/OWNERS
@@ -0,0 +1,3 @@
+quxiangfang@google.com
+shubang@google.com
+haofanw@google.com
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/Android.bp b/tv/mediaquality/aidl/Android.bp
new file mode 100644
index 0000000..1f273eb
--- /dev/null
+++ b/tv/mediaquality/aidl/Android.bp
@@ -0,0 +1,30 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+aidl_interface {
+ name: "android.hardware.tv.mediaquality",
+ vendor_available: true,
+ owner: "haofanw",
+ srcs: [
+ "android/hardware/tv/mediaquality/*.aidl",
+ ],
+ stability: "vintf",
+ backend: {
+ java: {
+ sdk_version: "module_current",
+ },
+ ndk: {
+ enabled: true,
+ },
+ rust: {
+ enabled: true,
+ },
+ },
+ frozen: false,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
new file mode 100644
index 0000000..6e8b23a
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.tv.mediaquality;
+@VintfStability
+interface IMediaQuality {
+ void setAmbientLightDetectionEnabled(in boolean enabled);
+ boolean getAmbientLightDetectionEnabled();
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
new file mode 100644
index 0000000..f75d6d1
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 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.hardware.tv.mediaquality;
+
+/**
+ * Interface for the media quality service
+ */
+@VintfStability
+interface IMediaQuality {
+ /**
+ * Sets the ambient backlight detection enabled or disabled. The ambient backlight is the
+ * projection of light against the wall driven by the current content playing. Enable will
+ * detects the Ambient backlight metadata and ambient control app can control the related
+ * device as configured before.
+ *
+ * @param enabled True to enable the ambient light detection, false to disable.
+ */
+ void setAmbientLightDetectionEnabled(in boolean enabled);
+
+ /**
+ * Gets the ambient light detection enabled status. The ambient light is enabled by
+ * calling setAmbientLightDetectionEnabled(in boolean enabled). True to enable the ambient
+ * light detection and False to disable the ambient light detection.
+ *
+ * @return True if the ambient light detection is enabled, false otherwise.
+ */
+ boolean getAmbientLightDetectionEnabled();
+}
diff --git a/tv/mediaquality/aidl/default/Android.bp b/tv/mediaquality/aidl/default/Android.bp
new file mode 100644
index 0000000..e25b01f
--- /dev/null
+++ b/tv/mediaquality/aidl/default/Android.bp
@@ -0,0 +1,24 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+rust_binary {
+ name: "android.hardware.tv.mediaquality-service.example",
+ relative_install_path: "hw",
+ init_rc: ["mediaquality-default.rc"],
+ vintf_fragments: ["mediaquality-default.xml"],
+ vendor: true,
+ rustlibs: [
+ "libandroid_logger",
+ "liblogger",
+ "liblog_rust",
+ "libbinder_rs",
+ "android.hardware.tv.mediaquality-V1-rust",
+ ],
+ srcs: ["main.rs"],
+}
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
new file mode 100644
index 0000000..c739ac8
--- /dev/null
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+//! This module implements the IMediaQuality AIDL interface.
+
+use android_hardware_tv_mediaquality::aidl::android::hardware::tv::mediaquality::{
+ IMediaQuality::IMediaQuality,
+};
+use binder::Interface;
+use std::sync::{Arc, Mutex};
+/// Defined so we can implement the IMediaQuality AIDL interface.
+pub struct MediaQualityService {
+ ambient_light_enabled: Arc<Mutex<bool>>
+}
+
+impl MediaQualityService {
+
+ /// Create a new instance of the MediaQualityService.
+ pub fn new() -> Self {
+ Self {
+ ambient_light_enabled: Arc::new(Mutex::new(false)),
+ }
+ }
+}
+
+impl Interface for MediaQualityService {}
+
+impl IMediaQuality for MediaQualityService {
+ fn setAmbientLightDetectionEnabled(&self, enabled: bool) -> binder::Result<()> {
+ println!("Received enabled: {}", enabled);
+ let mut ambient_light_enabled = self.ambient_light_enabled.lock().unwrap();
+ *ambient_light_enabled = enabled;
+ Ok(())
+ }
+
+ fn getAmbientLightDetectionEnabled(&self) -> binder::Result<bool> {
+ let ambient_light_enabled = self.ambient_light_enabled.lock().unwrap();
+ Ok(*ambient_light_enabled)
+ }
+}
diff --git a/tv/mediaquality/aidl/default/hal/mod.rs b/tv/mediaquality/aidl/default/hal/mod.rs
new file mode 100644
index 0000000..5b5d4ac
--- /dev/null
+++ b/tv/mediaquality/aidl/default/hal/mod.rs
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+pub mod media_quality_hal_impl;
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/default/main.rs b/tv/mediaquality/aidl/default/main.rs
new file mode 100644
index 0000000..f0cccb4
--- /dev/null
+++ b/tv/mediaquality/aidl/default/main.rs
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+//! This implements the MediaQuality Example Service.
+use android_hardware_tv_mediaquality::aidl::android::hardware::tv::mediaquality::IMediaQuality::{BnMediaQuality, IMediaQuality};
+use binder::BinderFeatures;
+
+mod hal;
+use hal::media_quality_hal_impl::MediaQualityService;
+
+const LOG_TAG: &str = "mediaquality_service_example_rust";
+
+use log::LevelFilter;
+
+fn main() {
+
+ android_logger::init_once(
+ android_logger::Config::default()
+ .with_tag(LOG_TAG)
+ .with_max_level(LevelFilter::Info),
+ );
+
+ let media_quality_service = MediaQualityService::new();
+ let media_quality_service_binder = BnMediaQuality::new_binder(media_quality_service, BinderFeatures::default());
+
+ let service_name = format!("{}/default", MediaQualityService::get_descriptor());
+ binder::add_service(&service_name, media_quality_service_binder.as_binder())
+ .expect("Failed to register service");
+
+ log::info!("MediaQualityHal service is running...");
+
+ binder::ProcessState::join_thread_pool();
+}
diff --git a/tv/mediaquality/aidl/default/mediaquality-default.rc b/tv/mediaquality/aidl/default/mediaquality-default.rc
new file mode 100644
index 0000000..5a103a9
--- /dev/null
+++ b/tv/mediaquality/aidl/default/mediaquality-default.rc
@@ -0,0 +1,4 @@
+service vendor.mediaquality-default /vendor/bin/hw/android.hardware.tv.mediaquality-service.example
+ class hal
+ user nobody
+ group nobody
diff --git a/tv/mediaquality/aidl/default/mediaquality-default.xml b/tv/mediaquality/aidl/default/mediaquality-default.xml
new file mode 100644
index 0000000..865f663
--- /dev/null
+++ b/tv/mediaquality/aidl/default/mediaquality-default.xml
@@ -0,0 +1,6 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl">
+ <name>android.hardware.tv.mediaquality</name>
+ <fqname>IMediaQuality/default</fqname>
+ </hal>
+</manifest>
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/vts/functional/Android.bp b/tv/mediaquality/aidl/vts/functional/Android.bp
new file mode 100644
index 0000000..b44740f
--- /dev/null
+++ b/tv/mediaquality/aidl/vts/functional/Android.bp
@@ -0,0 +1,41 @@
+// Copyright (C) 2024 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 {
+ default_team: "trendy_team_tv_os",
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+cc_test {
+ name: "VtsHalMediaQualityTargetTest",
+ defaults: [
+ "VtsHalTargetTestDefaults",
+ "use_libaidlvintf_gtest_helper_static",
+ ],
+ srcs: ["VtsHalMediaQualityTest.cpp"],
+ shared_libs: [
+ "libbinder",
+ ],
+ static_libs: [
+ "android.hardware.tv.mediaquality-V1-cpp",
+ ],
+ test_suites: [
+ "vts",
+ ],
+}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
new file mode 100644
index 0000000..5934e14
--- /dev/null
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+#define LOG_TAG "ambient_intelligence_light_aidl_hal_test"
+
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+#include <android/hardware/tv/mediaquality/IMediaQuality.h>
+#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
+#include <gtest/gtest.h>
+#include <hidl/GtestPrinter.h>
+#include <hidl/ServiceManagement.h>
+
+using android::ProcessState;
+using android::sp;
+using android::String16;
+using android::binder::Status;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::hardware::Void;
+using android::hardware::tv::mediaquality::IMediaQuality;
+
+#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
+#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
+
+class MediaQualityAidl : public testing::TestWithParam<std::string> {
+ public:
+ void SetUp() override {
+ mediaquality = android::waitForDeclaredService<IMediaQuality>(String16(GetParam().c_str()));
+ ASSERT_NE(mediaquality, nullptr);
+ }
+
+ sp<IMediaQuality> mediaquality;
+
+ void TearDown() override {}
+};
+
+TEST_P(MediaQualityAidl, TestSetAmbientLightDetectionEnabled) {
+ ASSERT_OK(mediaquality->setAmbientLightDetectionEnabled(true));
+}
+
+TEST_P(MediaQualityAidl, TestGetAmbientLightDetectionEnabled) {
+ bool enabled;
+ Status status = mediaquality->getAmbientLightDetectionEnabled(&enabled);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_TRUE(enabled);
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(MediaQualityAidl);
+
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, MediaQualityAidl,
+ testing::ValuesIn(android::getAidlHalInstanceNames(IMediaQuality::descriptor)),
+ android::PrintInstanceNameToString);
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ ProcessState::self()->startThreadPool();
+ return RUN_ALL_TESTS();
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/BandMask.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/BandMask.aidl
new file mode 100644
index 0000000..6d16580
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/BandMask.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable BandMask {
+ const int BAND_2_GHZ = (1 << 0) /* 1 */;
+ const int BAND_5_GHZ = (1 << 1) /* 2 */;
+ const int BAND_6_GHZ = (1 << 2) /* 4 */;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index 0462fd3..d54e44c 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -74,6 +74,9 @@
android.hardware.wifi.supplicant.IfaceType getType();
void invite(in String groupIfName, in byte[] goDeviceAddress, in byte[] peerAddress);
int[] listNetworks();
+ /**
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use provisionDiscoveryWithParams.
+ */
void provisionDiscovery(in byte[] peerAddress, in android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod);
void registerCallback(in android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback callback);
void reinvoke(in int persistentNetworkId, in byte[] peerAddress);
@@ -124,6 +127,11 @@
void addGroupWithConfigurationParams(in android.hardware.wifi.supplicant.P2pAddGroupConfigurationParams groupConfigurationParams);
void createGroupOwner(in android.hardware.wifi.supplicant.P2pCreateGroupOwnerInfo groupOwnerInfo);
long getFeatureSet();
+ int startUsdBasedServiceDiscovery(in android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryConfig serviceDiscoveryConfig);
+ void stopUsdBasedServiceDiscovery(in int sessionId);
+ int startUsdBasedServiceAdvertisement(in android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig serviceAdvertisementConfig);
+ void stopUsdBasedServiceAdvertisement(in int sessionId);
+ void provisionDiscoveryWithParams(in android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams params);
const long P2P_FEATURE_V2 = (1 << 0) /* 1 */;
const long P2P_FEATURE_PCC_MODE_WPA3_COMPATIBILITY = (1 << 1) /* 2 */;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
index 65ad4c1..3b283b8 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
@@ -80,4 +80,7 @@
oneway void onDeviceFoundWithParams(in android.hardware.wifi.supplicant.P2pDeviceFoundEventParams deviceFoundEventParams);
oneway void onGoNegotiationRequestWithParams(in android.hardware.wifi.supplicant.P2pGoNegotiationReqEventParams params);
oneway void onInvitationReceivedWithParams(in android.hardware.wifi.supplicant.P2pInvitationEventParams params);
+ oneway void onUsdBasedServiceDiscoveryResult(in android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryResultParams params);
+ oneway void onUsdBasedServiceDiscoveryTerminated(in int sessionId, in android.hardware.wifi.supplicant.UsdTerminateReasonCode reasonCode);
+ oneway void onUsdBasedServiceAdvertisementTerminated(in int sessionId, in android.hardware.wifi.supplicant.UsdTerminateReasonCode reasonCode);
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index f4662de..88dd740 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -41,4 +41,6 @@
boolean persistent;
int goIntent;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ int pairingBootstrappingMethod;
+ @nullable String password;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
index 4451fb5..901b9d1 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
@@ -37,4 +37,5 @@
boolean persistent;
int persistentNetworkId;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ boolean isP2pV2;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index ee8e6dc..68cde9e 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -45,4 +45,5 @@
byte[] wfdR2DeviceInfo;
byte[] vendorElemBytes;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ int pairingBootstrappingMethods;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
new file mode 100644
index 0000000..6e83277
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable P2pPairingBootstrappingMethodMask {
+ const int BOOTSTRAPPING_OPPORTUNISTIC = (1 << 0) /* 1 */;
+ const int BOOTSTRAPPING_DISPLAY_PINCODE = (1 << 1) /* 2 */;
+ const int BOOTSTRAPPING_DISPLAY_PASSPHRASE = (1 << 2) /* 4 */;
+ const int BOOTSTRAPPING_KEYPAD_PINCODE = (1 << 3) /* 8 */;
+ const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = (1 << 4) /* 16 */;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
index 46366cc..60da924 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
@@ -41,4 +41,6 @@
String generatedPin;
String groupInterfaceName;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
+ int pairingBootstrappingMethod;
+ @nullable String password;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl
new file mode 100644
index 0000000..b5dc4b1
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable P2pProvisionDiscoveryParams {
+ byte[6] peerMacAddress;
+ android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod;
+ int pairingBootstrappingMethod;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl
new file mode 100644
index 0000000..36ce742
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable P2pUsdBasedServiceAdvertisementConfig {
+ String serviceName;
+ int serviceProtocolType;
+ byte[] serviceSpecificInfo;
+ int frequencyMHz;
+ int timeoutInSeconds;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl
new file mode 100644
index 0000000..a13d107
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable P2pUsdBasedServiceDiscoveryConfig {
+ String serviceName;
+ int serviceProtocolType;
+ byte[] serviceSpecificInfo;
+ int bandMask;
+ int[] frequencyListMhz;
+ int timeoutInSeconds;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl
new file mode 100644
index 0000000..da129cf
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@VintfStability
+parcelable P2pUsdBasedServiceDiscoveryResultParams {
+ byte[6] peerMacAddress;
+ int sessionId;
+ int peerSessionId;
+ int serviceProtocolType;
+ byte[] serviceSpecificInfo;
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl
new file mode 100644
index 0000000..0f84783
--- /dev/null
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.hardware.wifi.supplicant;
+@Backing(type="int") @VintfStability
+enum UsdTerminateReasonCode {
+ UNKNOWN = 0,
+ TIMEOUT = 1,
+ USER_REQUEST = 2,
+ FAILURE = 3,
+}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
index 177d218..58ac0eb 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
@@ -34,6 +34,7 @@
package android.hardware.wifi.supplicant;
@Backing(type="int") @VintfStability
enum WpsProvisionMethod {
+ NONE = (-1) /* -1 */,
PBC,
DISPLAY,
KEYPAD,
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/BandMask.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/BandMask.aidl
new file mode 100644
index 0000000..6d1b2be
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/BandMask.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+/**
+ * Wifi bands
+ */
+@VintfStability
+parcelable BandMask {
+ /**
+ * 2.4 GHz band.
+ */
+ const int BAND_2_GHZ = 1 << 0;
+ /**
+ * 5 GHz band.
+ */
+ const int BAND_5_GHZ = 1 << 1;
+ /**
+ * 6 GHz band.
+ */
+ const int BAND_6_GHZ = 1 << 2;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index 6a9406a..62f9fc3 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -29,6 +29,9 @@
import android.hardware.wifi.supplicant.P2pExtListenInfo;
import android.hardware.wifi.supplicant.P2pFrameTypeMask;
import android.hardware.wifi.supplicant.P2pGroupCapabilityMask;
+import android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams;
+import android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig;
+import android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryConfig;
import android.hardware.wifi.supplicant.WpsConfigMethods;
import android.hardware.wifi.supplicant.WpsProvisionMethod;
@@ -407,6 +410,9 @@
* Send P2P provision discovery request to the specified peer. The
* parameters for this command are the P2P device address of the peer and the
* desired configuration method.
+ * <p>
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use
+ * provisionDiscoveryWithParams.
*
* @param peerAddress MAC address of the device to send discovery.
* @method provisionMethod Provisioning method to use.
@@ -957,4 +963,63 @@
* |SupplicantStatusCode.FAILURE_UNKNOWN|
*/
long getFeatureSet();
+
+ /**
+ * Start an Unsynchronized Service Discovery (USD) based P2P service discovery.
+ *
+ * @param serviceDiscoveryConfig Configuration associated with this discovery operation.
+ * @return A non-zero identifier to identify the instance of a service discovery.
+ * It is used to cancel the service discovery.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ int startUsdBasedServiceDiscovery(in P2pUsdBasedServiceDiscoveryConfig serviceDiscoveryConfig);
+
+ /**
+ * Stop an Unsynchronized Service Discovery (USD) based P2P service discovery.
+ *
+ * @param sessionId Identifier to cancel the service discovery instance.
+ * Use zero to cancel all the service discovery instances.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_NOT_STARTED|
+ */
+ void stopUsdBasedServiceDiscovery(in int sessionId);
+
+ /**
+ * Start an Unsynchronized Service Discovery (USD) based P2P service advertisement.
+ *
+ * @param serviceDiscoveryConfig Configuration associated with this service advertisement.
+ * @return A non-zero identifier to identify the instance of a service advertisement.
+ * It is used to cancel the service advertisement.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ int startUsdBasedServiceAdvertisement(
+ in P2pUsdBasedServiceAdvertisementConfig serviceAdvertisementConfig);
+
+ /**
+ * Stop an Unsynchronized Service Discovery (USD) based P2P service advertisement.
+ *
+ * @param sessionId Identifier to cancel the service advertisement.
+ * Use zero to cancel all the service advertisement instances.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_NOT_STARTED|
+ */
+ void stopUsdBasedServiceAdvertisement(in int sessionId);
+
+ /**
+ * Send P2P provision discovery request to the specified peer.
+ *
+ * @param params Parameters associated with this provision discovery request.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ void provisionDiscoveryWithParams(in P2pProvisionDiscoveryParams params);
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
index 44a5465..a52e150 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.aidl
@@ -26,6 +26,8 @@
import android.hardware.wifi.supplicant.P2pProvDiscStatusCode;
import android.hardware.wifi.supplicant.P2pProvisionDiscoveryCompletedEventParams;
import android.hardware.wifi.supplicant.P2pStatusCode;
+import android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryResultParams;
+import android.hardware.wifi.supplicant.UsdTerminateReasonCode;
import android.hardware.wifi.supplicant.WpsConfigMethods;
import android.hardware.wifi.supplicant.WpsDevPasswordId;
@@ -325,4 +327,29 @@
* @param params Parameters associated with the invitation request event.
*/
void onInvitationReceivedWithParams(in P2pInvitationEventParams params);
+
+ /**
+ * Used to indicate the reception of an USD based service discovery response.
+ *
+ * @param params Parameters associated with the USD based service discovery result.
+ */
+ void onUsdBasedServiceDiscoveryResult(in P2pUsdBasedServiceDiscoveryResultParams params);
+
+ /**
+ * Used to indicate the termination of USD based service discovery.
+ *
+ * @param sessionId Identifier to identify the instance of a service discovery.
+ * @param reasonCode The reason for termination of service discovery.
+ */
+ void onUsdBasedServiceDiscoveryTerminated(
+ in int sessionId, in UsdTerminateReasonCode reasonCode);
+
+ /**
+ * Used to indicate the termination of USD based service Advertisement.
+ *
+ * @param sessionId Identifier to identify the instance of a service advertisement.
+ * @param reasonCode The reason for termination of service advertisement.
+ */
+ void onUsdBasedServiceAdvertisementTerminated(
+ in int sessionId, in UsdTerminateReasonCode reasonCode);
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index f09b476..8f3c596 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -30,7 +30,9 @@
byte[6] peerAddress;
/**
- * Provisioning method to use.
+ * Wi-Fi Protected Setup provisioning method. If using Wi-Fi Protected Setup,
+ * then must be set to a non-|WpsProvisionMethod.NONE| provisioning method,
+ * otherwise set to |WpsProvisionMethod.NONE|.
*/
WpsProvisionMethod provisionMethod;
@@ -65,4 +67,19 @@
* that no vendor data is provided.
*/
@nullable OuiKeyedData[] vendorData;
+
+ /**
+ * Wi-Fi Direct pairing bootstrapping method. If using P2P pairing protocol,
+ * then must be set one of the |P2pPairingBootstrappingMethodMask|, otherwise
+ * set to zero.
+ */
+ int pairingBootstrappingMethod;
+
+ /**
+ * Password for pairing setup, if |bootstrappingMethod| uses one of the
+ * |P2pPairingBootstrappingMethodMask| methods other than
+ * P2pPairingBootstrappingMethodMask.BOOTSTRAPPING_OPPORTUNISTIC,
+ * null otherwise.
+ */
+ @nullable String password;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
index 51e6ed9..83d480e 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pCreateGroupOwnerInfo.aidl
@@ -39,4 +39,9 @@
* that no vendor data is provided.
*/
@nullable OuiKeyedData[] vendorData;
+ /**
+ * Used to start a Group Owner that support P2P2 IE. The connection to this Group Owner can
+ * be established only using P2P Pairing protocol.
+ */
+ boolean isP2pV2;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index 15917b6..31e64ac 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -89,4 +89,10 @@
* Null value indicates that no vendor data is provided.
*/
@nullable OuiKeyedData[] vendorData;
+
+ /**
+ * The bitmask of P2pPairingBootstrappingMethodMask.BOOTSTRAPPING_* methods used to enable
+ * the pairing bootstrapping between bootstrapping initiator and a bootstrapping responder.
+ */
+ int pairingBootstrappingMethods;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
new file mode 100644
index 0000000..cac8c53
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+/**
+ * P2P Pairing Bootstrapping Method.
+ */
+@VintfStability
+parcelable P2pPairingBootstrappingMethodMask {
+ /** Opportunistic bootstrapping */
+ const int BOOTSTRAPPING_OPPORTUNISTIC = 1 << 0;
+ /** Display pin-code only */
+ const int BOOTSTRAPPING_DISPLAY_PINCODE = 1 << 1;
+ /** Display passphrase */
+ const int BOOTSTRAPPING_DISPLAY_PASSPHRASE = 1 << 2;
+ /** Keypad pin-code only */
+ const int BOOTSTRAPPING_KEYPAD_PINCODE = 1 << 3;
+ /** Keypad passphrase */
+ const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = 1 << 4;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
index 05152a9..97659b6 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryCompletedEventParams.aidl
@@ -33,7 +33,11 @@
boolean isRequest;
/** Status of the provision discovery */
P2pProvDiscStatusCode status;
- /** Mask of |WpsConfigMethods| indicating the supported methods */
+ /**
+ * Wi-Fi Protected Setup provisioning method. If using Wi-Fi Protected Setup,
+ * then must be set to a non-|WpsProvisionMethod.NONE| provisioning method,
+ * otherwise set to |WpsProvisionMethod.NONE|.
+ */
int configMethods;
/** 8-digit pin generated */
String generatedPin;
@@ -50,4 +54,17 @@
* that no vendor data is provided.
*/
@nullable OuiKeyedData[] vendorData;
+ /**
+ * Wi-Fi Direct pairing bootstrapping method. If using P2P pairing protocol,
+ * then must be set one of the |P2pPairingBootstrappingMethodMask|, otherwise
+ * set to zero.
+ */
+ int pairingBootstrappingMethod;
+ /**
+ * Password for pairing setup, if |bootstrappingMethod| uses one of the
+ * |P2pPairingBootstrappingMethodMask| methods other than
+ * P2pPairingBootstrappingMethodMask.BOOTSTRAPPING_OPPORTUNISTIC,
+ * null otherwise.
+ */
+ @nullable String password;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl
new file mode 100644
index 0000000..37f2374
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pProvisionDiscoveryParams.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+import android.hardware.wifi.supplicant.WpsProvisionMethod;
+
+/**
+ * Parameters used for |ISupplicantP2pIfaceCallback.provisionDiscoveryWithParams|
+ */
+@VintfStability
+parcelable P2pProvisionDiscoveryParams {
+ /**
+ * MAC address of the peer device to send the provision discovery request.
+ */
+ byte[6] peerMacAddress;
+
+ /**
+ * Wi-Fi Protected Setup provisioning method. If using Wi-Fi Protected Setup,
+ * then must be set to a non-|WpsProvisionMethod.NONE| provisioning method,
+ * otherwise set to |WpsProvisionMethod.NONE|.
+ */
+ WpsProvisionMethod provisionMethod;
+
+ /**
+ * Wi-Fi Direct pairing bootstrapping method. If using P2P pairing protocol,
+ * then must be set one of the |P2pPairingBootstrappingMethodMask|, otherwise
+ * set to zero.
+ */
+ int pairingBootstrappingMethod;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl
new file mode 100644
index 0000000..1920f1a
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceAdvertisementConfig.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+/**
+ * Unsynchronized Service Discovery (USD) based P2P service advertisement configuration.
+ * Refer Wi-Fi Alliance Wi-Fi Direct R2 specification - Appendix H -
+ * Unsynchronized Service Discovery (as defined in Wi-Fi Aware) and section
+ * 4.2.13 USD frame format.
+ */
+@VintfStability
+parcelable P2pUsdBasedServiceAdvertisementConfig {
+ /** UTF-8 string defining the service */
+ String serviceName;
+
+ /** Service Protocol Type */
+ int serviceProtocolType;
+
+ /** Service specific information content determined by the application */
+ byte[] serviceSpecificInfo;
+
+ /**
+ * Channel frequency in MHz to listen for service discovery request.
+ */
+ int frequencyMHz;
+
+ /**
+ * Max time to be spent for service advertisement.
+ */
+ int timeoutInSeconds;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl
new file mode 100644
index 0000000..c7d6f0e
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryConfig.aidl
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+import android.hardware.wifi.supplicant.BandMask;
+
+/**
+ * Unsynchronized Service Discovery (USD) based P2P service discovery configuration.
+ * Refer Wi-Fi Alliance Wi-Fi Direct R2 specification - Appendix H -
+ * Unsynchronized Service Discovery (as defined in Wi-Fi Aware) and section
+ * 4.2.13 USD frame format
+ */
+@VintfStability
+parcelable P2pUsdBasedServiceDiscoveryConfig {
+ /** UTF-8 string defining the service */
+ String serviceName;
+
+ /** Service Protocol Type */
+ int serviceProtocolType;
+
+ /** Service specific information content determined by the application */
+ byte[] serviceSpecificInfo;
+
+ /**
+ * Bit mask of bands to scan for services.
+ * Set this value to Bitmask of |BandMask| only if its required to scan all the channels
+ * in a band.
+ */
+ int bandMask;
+
+ /**
+ * A list of frequencies in MHz to scan for services.
+ * This field is used only when the bandMask is set to zero.
+ */
+ int[] frequencyListMhz;
+
+ /**
+ * Max time to be spent in performing discovery.
+ * Set to 0 to indefinitely continue discovery until a service is
+ * discovered.
+ */
+ int timeoutInSeconds;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl
new file mode 100644
index 0000000..becc437
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pUsdBasedServiceDiscoveryResultParams.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+import android.hardware.wifi.supplicant.BandMask;
+
+/**
+ * Unsynchronized Service Discovery (USD) based P2P service discovery result event.
+ * Refer Wi-Fi Alliance Wi-Fi Direct R2 specification - Appendix H -
+ * Unsynchronized Service Discovery (as defined in Wi-Fi Aware) and section
+ * 4.2.13 USD frame format
+ */
+@VintfStability
+parcelable P2pUsdBasedServiceDiscoveryResultParams {
+ /** MAC address of the device that sent the service discovery */
+ byte[6] peerMacAddress;
+
+ /** Identifier to identify the service discovery instance */
+ int sessionId;
+
+ /** Identifier to identify the peer service advertisement instance */
+ int peerSessionId;
+
+ /** Service Protocol Type */
+ int serviceProtocolType;
+
+ /** Service specific information content determined by the application */
+ byte[] serviceSpecificInfo;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl
new file mode 100644
index 0000000..6725c3d
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdTerminateReasonCode.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2024 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.hardware.wifi.supplicant;
+
+/**
+ * Status codes for P2P operations.
+ */
+@VintfStability
+@Backing(type="int")
+enum UsdTerminateReasonCode {
+ UNKNOWN = 0,
+ TIMEOUT = 1,
+ USER_REQUEST = 2,
+ FAILURE = 3,
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
index 5b59392..b8ad3b8 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/WpsProvisionMethod.aidl
@@ -19,6 +19,7 @@
@VintfStability
@Backing(type="int")
enum WpsProvisionMethod {
+ NONE = -1,
/**
* Push button method.
*/
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
index a8132aa..3226ffd 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
@@ -17,8 +17,10 @@
#include <VtsCoreUtil.h>
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
+#include <aidl/android/hardware/wifi/supplicant/BandMask.h>
#include <aidl/android/hardware/wifi/supplicant/BnSupplicant.h>
#include <aidl/android/hardware/wifi/supplicant/BnSupplicantP2pIfaceCallback.h>
+#include <aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.h>
#include <aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.h>
#include <android/binder_manager.h>
#include <android/binder_status.h>
@@ -29,6 +31,7 @@
#include "supplicant_test_utils.h"
#include "wifi_aidl_test_utils.h"
+using aidl::android::hardware::wifi::supplicant::BandMask;
using aidl::android::hardware::wifi::supplicant::BnSupplicantP2pIfaceCallback;
using aidl::android::hardware::wifi::supplicant::DebugLevel;
using aidl::android::hardware::wifi::supplicant::FreqRange;
@@ -47,13 +50,20 @@
using aidl::android::hardware::wifi::supplicant::P2pGroupCapabilityMask;
using aidl::android::hardware::wifi::supplicant::P2pGroupStartedEventParams;
using aidl::android::hardware::wifi::supplicant::P2pInvitationEventParams;
+using aidl::android::hardware::wifi::supplicant::P2pPairingBootstrappingMethodMask;
using aidl::android::hardware::wifi::supplicant::P2pPeerClientDisconnectedEventParams;
using aidl::android::hardware::wifi::supplicant::P2pPeerClientJoinedEventParams;
using aidl::android::hardware::wifi::supplicant::P2pProvDiscStatusCode;
using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryCompletedEventParams;
+using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryParams;
+;
using aidl::android::hardware::wifi::supplicant::P2pScanType;
using aidl::android::hardware::wifi::supplicant::P2pStatusCode;
+using aidl::android::hardware::wifi::supplicant::P2pUsdBasedServiceAdvertisementConfig;
+using aidl::android::hardware::wifi::supplicant::P2pUsdBasedServiceDiscoveryConfig;
+using aidl::android::hardware::wifi::supplicant::P2pUsdBasedServiceDiscoveryResultParams;
using aidl::android::hardware::wifi::supplicant::SupplicantStatusCode;
+using aidl::android::hardware::wifi::supplicant::UsdTerminateReasonCode;
using aidl::android::hardware::wifi::supplicant::WpsConfigMethods;
using aidl::android::hardware::wifi::supplicant::WpsDevPasswordId;
using aidl::android::hardware::wifi::supplicant::WpsProvisionMethod;
@@ -67,13 +77,18 @@
const std::vector<uint8_t> kTestPeerMacAddr = {0x56, 0x67, 0x55,
0xf4, 0x56, 0x92};
const std::vector<uint8_t> kTestZeroMacAddr = std::vector<uint8_t>(6, 0);
+const std::string kTestServiceSpecificInfoStr = "TestServiceSpecificInfo";
+const std::vector<uint8_t> kTestServiceSpecificInfo = std::vector<uint8_t>(
+ kTestServiceSpecificInfoStr.begin(), kTestServiceSpecificInfoStr.end());
const std::string kTestPassphrase = "P2pWorld1234";
const std::string kTestConnectPin = "34556665";
const std::string kTestGroupIfName = "TestGroup";
+const std::string kTestServiceName = "TestServiceName";
const uint32_t kTestFindTimeout = 5;
const uint32_t kTestConnectGoIntent = 6;
const uint32_t kTestNetworkId = 7;
const uint32_t kTestGroupFreq = 0;
+const uint32_t kTestServiceProtocolType = 1;
const bool kTestGroupPersistent = false;
const bool kTestGroupIsJoin = false;
const auto& kTestVendorDataOptional = generateOuiKeyedDataListOptional(5);
@@ -222,6 +237,18 @@
const P2pInvitationEventParams& /* invitationEventParams */) override {
return ndk::ScopedAStatus::ok();
}
+ ::ndk::ScopedAStatus onUsdBasedServiceDiscoveryResult(
+ const P2pUsdBasedServiceDiscoveryResultParams& /* discoveryResultParams*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+ ::ndk::ScopedAStatus onUsdBasedServiceDiscoveryTerminated(
+ int32_t /* sessionId */, UsdTerminateReasonCode /* reasonCode */) override {
+ return ndk::ScopedAStatus::ok();
+ }
+ ::ndk::ScopedAStatus onUsdBasedServiceAdvertisementTerminated(
+ int32_t /* sessionId */, UsdTerminateReasonCode /* reasonCode */) override {
+ return ndk::ScopedAStatus::ok();
+ }
};
class SupplicantP2pIfaceAidlTest : public testing::TestWithParam<std::string> {
@@ -246,6 +273,9 @@
EXPECT_TRUE(supplicant_->getP2pInterface(getP2pIfaceName(), &p2p_iface_)
.isOk());
ASSERT_NE(p2p_iface_, nullptr);
+ if (interface_version_ >= 4) {
+ EXPECT_TRUE(p2p_iface_->getFeatureSet(&supported_features_).isOk());
+ }
}
void TearDown() override {
@@ -257,6 +287,7 @@
std::shared_ptr<ISupplicant> supplicant_;
std::shared_ptr<ISupplicantP2pIface> p2p_iface_;
int interface_version_;
+ int64_t supported_features_;
};
/*
@@ -815,9 +846,9 @@
}
/*
- * getFeatureSet
+ * GetFeatureSet
*/
-TEST_P(SupplicantP2pIfaceAidlTest, getFeatureSet) {
+TEST_P(SupplicantP2pIfaceAidlTest, gGetFeatureSet) {
if (interface_version_ < 4) {
GTEST_SKIP() << "getFeatureSet is available as of Supplicant V4";
}
@@ -825,6 +856,74 @@
EXPECT_TRUE(p2p_iface_->getFeatureSet(&featureSet).isOk());
}
+/*
+ * StartUsdBasedServiceDiscovery/stopUsdBasedServiceDiscovery
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, StartStopUsdBasedServiceDiscovery) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "Start/Stop UsdBasedServiceDiscovery is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ int32_t sessionId;
+ P2pUsdBasedServiceDiscoveryConfig config;
+ config.serviceName = kTestServiceName;
+ config.serviceProtocolType = kTestServiceProtocolType;
+ config.serviceSpecificInfo = kTestServiceSpecificInfo;
+ config.bandMask = BandMask::BAND_2_GHZ;
+ config.timeoutInSeconds = 30;
+
+ EXPECT_TRUE(p2p_iface_->startUsdBasedServiceDiscovery(config, &sessionId).isOk());
+ sleep(1);
+ EXPECT_TRUE(p2p_iface_->stopUsdBasedServiceDiscovery(sessionId).isOk());
+}
+
+/*
+ * StartUsdBasedServiceAdvertisement/StopUsdBasedServiceAdvertisement
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, StartStopUsdBasedServiceAdvertisement) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "start/Stop UsdBasedServiceAdvertisement is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ int32_t sessionId;
+ P2pUsdBasedServiceAdvertisementConfig config;
+ config.serviceName = kTestServiceName;
+ config.serviceProtocolType = kTestServiceProtocolType;
+ config.serviceSpecificInfo = kTestServiceSpecificInfo;
+ config.frequencyMHz = 2412;
+ config.timeoutInSeconds = 30;
+
+ EXPECT_TRUE(p2p_iface_->startUsdBasedServiceAdvertisement(config, &sessionId).isOk());
+ sleep(1);
+ EXPECT_TRUE(p2p_iface_->stopUsdBasedServiceAdvertisement(sessionId).isOk());
+}
+
+/*
+ * ProvisionDiscoveryWithParams
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, ProvisionDiscoveryWithParams) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "ProvisionDiscoveryWithParams is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ P2pProvisionDiscoveryParams params;
+ params.peerMacAddress = vecToArrayMacAddr(kTestMacAddr);
+ params.provisionMethod = WpsProvisionMethod::NONE;
+ params.pairingBootstrappingMethod =
+ P2pPairingBootstrappingMethodMask::BOOTSTRAPPING_OPPORTUNISTIC;
+
+ EXPECT_TRUE(p2p_iface_->provisionDiscoveryWithParams(params).isOk());
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SupplicantP2pIfaceAidlTest);
INSTANTIATE_TEST_SUITE_P(Supplicant, SupplicantP2pIfaceAidlTest,
testing::ValuesIn(android::getAidlHalInstanceNames(