Merge "Notify scan-only mode to driver for power saving"
diff --git a/audio/core/all-versions/default/StreamOut.cpp b/audio/core/all-versions/default/StreamOut.cpp
index 357fd94..b5ddba0 100644
--- a/audio/core/all-versions/default/StreamOut.cpp
+++ b/audio/core/all-versions/default/StreamOut.cpp
@@ -658,32 +658,65 @@
#if MAJOR_VERSION >= 6
Return<void> StreamOut::getDualMonoMode(getDualMonoMode_cb _hidl_cb) {
- _hidl_cb(Result::NOT_SUPPORTED, DualMonoMode::OFF);
+ audio_dual_mono_mode_t mode = AUDIO_DUAL_MONO_MODE_OFF;
+ Result retval = mStream->get_dual_mono_mode != nullptr
+ ? Stream::analyzeStatus("get_dual_mono_mode",
+ mStream->get_dual_mono_mode(mStream, &mode))
+ : Result::NOT_SUPPORTED;
+ _hidl_cb(retval, DualMonoMode(mode));
return Void();
}
-Return<Result> StreamOut::setDualMonoMode(DualMonoMode /*mode*/) {
- return Result::NOT_SUPPORTED;
+Return<Result> StreamOut::setDualMonoMode(DualMonoMode mode) {
+ return mStream->set_dual_mono_mode != nullptr
+ ? Stream::analyzeStatus(
+ "set_dual_mono_mode",
+ mStream->set_dual_mono_mode(mStream,
+ static_cast<audio_dual_mono_mode_t>(mode)))
+ : Result::NOT_SUPPORTED;
}
Return<void> StreamOut::getAudioDescriptionMixLevel(getAudioDescriptionMixLevel_cb _hidl_cb) {
- _hidl_cb(Result::NOT_SUPPORTED, -std::numeric_limits<float>::infinity());
+ float leveldB = -std::numeric_limits<float>::infinity();
+ Result retval = mStream->get_audio_description_mix_level != nullptr
+ ? Stream::analyzeStatus(
+ "get_audio_description_mix_level",
+ mStream->get_audio_description_mix_level(mStream, &leveldB))
+ : Result::NOT_SUPPORTED;
+ _hidl_cb(retval, leveldB);
return Void();
}
-Return<Result> StreamOut::setAudioDescriptionMixLevel(float /*leveldB*/) {
- return Result::NOT_SUPPORTED;
+Return<Result> StreamOut::setAudioDescriptionMixLevel(float leveldB) {
+ return mStream->set_audio_description_mix_level != nullptr
+ ? Stream::analyzeStatus(
+ "set_audio_description_mix_level",
+ mStream->set_audio_description_mix_level(mStream, leveldB))
+ : Result::NOT_SUPPORTED;
}
Return<void> StreamOut::getPlaybackRateParameters(getPlaybackRateParameters_cb _hidl_cb) {
- _hidl_cb(Result::NOT_SUPPORTED,
- // Same as AUDIO_PLAYBACK_RATE_INITIALIZER
- PlaybackRate{1.0f, 1.0f, TimestretchMode::DEFAULT, TimestretchFallbackMode::FAIL});
+ audio_playback_rate_t rate = AUDIO_PLAYBACK_RATE_INITIALIZER;
+ Result retval =
+ mStream->get_playback_rate_parameters != nullptr
+ ? Stream::analyzeStatus("get_playback_rate_parameters",
+ mStream->get_playback_rate_parameters(mStream, &rate))
+ : Result::NOT_SUPPORTED;
+ _hidl_cb(retval,
+ PlaybackRate{rate.mSpeed, rate.mPitch, static_cast<TimestretchMode>(rate.mStretchMode),
+ static_cast<TimestretchFallbackMode>(rate.mFallbackMode)});
return Void();
}
-Return<Result> StreamOut::setPlaybackRateParameters(const PlaybackRate& /*playbackRate*/) {
- return Result::NOT_SUPPORTED;
+Return<Result> StreamOut::setPlaybackRateParameters(const PlaybackRate& playbackRate) {
+ audio_playback_rate_t rate = {
+ playbackRate.speed, playbackRate.pitch,
+ static_cast<audio_timestretch_stretch_mode_t>(playbackRate.timestretchMode),
+ static_cast<audio_timestretch_fallback_mode_t>(playbackRate.fallbackMode)};
+ return mStream->set_playback_rate_parameters != nullptr
+ ? Stream::analyzeStatus("set_playback_rate_parameters",
+ mStream->set_playback_rate_parameters(mStream, &rate))
+ : Result::NOT_SUPPORTED;
}
Return<Result> StreamOut::setEventCallback(const sp<IStreamOutEventCallback>& callback) {
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
index 56d097d..8fd6c5f 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AuthenticationFrame.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AuthenticationFrame.aidl
index 3043000..a9e4de3 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AuthenticationFrame.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AuthenticationFrame.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/BaseFrame.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/BaseFrame.aidl
index 27821e3..a935101 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/BaseFrame.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/BaseFrame.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Cell.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Cell.aidl
index 17c1ba3..cc2bf53 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Cell.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Cell.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentFrame.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentFrame.aidl
index c736e7e..cc78e6b 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentFrame.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentFrame.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
index af6be90..fefac68 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStageConfig.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStageConfig.aidl
index 268ce52..d13eccd 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStageConfig.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStageConfig.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
index 7295b3b..3603c4e 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
index cba6ec5..6bbe787 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
index b08c345..481b678 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl
new file mode 100644
index 0000000..d9e561d
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 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.biometrics.face;
+@Backing(type="byte") @VintfStability
+enum Feature {
+ WAVE_ATTENTION_REQUIREMENT = 0,
+ WAVE_DIVERSE_POSES_REQUIREMENT = 1,
+ DEBUG = 2,
+}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/IFace.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/IFace.aidl
index 65afaa4..37345ec 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/IFace.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/IFace.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
index 203e275..b855a9e 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
@@ -21,11 +35,13 @@
interface ISession {
void generateChallenge(in int cookie, in int timeoutSec);
void revokeChallenge(in int cookie, in long challenge);
- android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.biometrics.face.EnrollmentType enrollmentType, in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.common.NativeHandle previewSurface);
+ android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in android.hardware.common.NativeHandle previewSurface);
android.hardware.biometrics.common.ICancellationSignal authenticate(in int cookie, in long operationId);
android.hardware.biometrics.common.ICancellationSignal detectInteraction(in int cookie);
void enumerateEnrollments(in int cookie);
void removeEnrollments(in int cookie, in int[] enrollmentIds);
+ void getFeatures(in int cookie, in int enrollmentId);
+ void setFeature(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, in int enrollmentId, in android.hardware.biometrics.face.Feature feature, boolean enabled);
void getAuthenticatorId(in int cookie);
void invalidateAuthenticatorId(in int cookie);
void resetLockout(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat);
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISessionCallback.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISessionCallback.aidl
index a81c79a..6127c7b 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISessionCallback.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISessionCallback.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
@@ -33,6 +47,8 @@
void onLockoutCleared();
void onInteractionDetected();
void onEnrollmentsEnumerated(in int[] enrollmentIds);
+ void onFeaturesRetrieved(in android.hardware.biometrics.face.Feature[] features, in int enrollmentId);
+ void onFeatureSet(in int enrollmentId, android.hardware.biometrics.face.Feature feature);
void onEnrollmentsRemoved(in int[] enrollmentIds);
void onAuthenticatorIdRetrieved(in long authenticatorId);
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SensorProps.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SensorProps.aidl
index a52829c..9147bc1 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SensorProps.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SensorProps.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SessionState.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SessionState.aidl
index 12a5eab..46751d0 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SessionState.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SessionState.aidl
@@ -1,4 +1,18 @@
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * Copyright (C) 2021 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. //
///////////////////////////////////////////////////////////////////////////////
@@ -28,7 +42,9 @@
DETECTING_INTERACTION = 6,
ENUMERATING_ENROLLMENTS = 7,
REMOVING_ENROLLMENTS = 8,
- GETTING_AUTHENTICATOR_ID = 9,
- INVALIDATING_AUTHENTICATOR_ID = 10,
- RESETTING_LOCKOUT = 11,
+ GETTING_FEATURES = 9,
+ SETTING_FEATURE = 10,
+ GETTING_AUTHENTICATOR_ID = 11,
+ INVALIDATING_AUTHENTICATOR_ID = 12,
+ RESETTING_LOCKOUT = 13,
}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl
index d88370f..7230128 100644
--- a/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl
@@ -32,9 +32,8 @@
HW_UNAVAILABLE = 1,
/**
- * The current enroll or authenticate operation could not be completed,
- * e.g. the sensor was unable to process the current image or the HAT was
- * invalid.
+ * The current operation could not be completed, e.g. the sensor was unable
+ * to process the current image or the HAT was invalid.
*/
UNABLE_TO_PROCESS = 2,
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/Feature.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/Feature.aidl
new file mode 100644
index 0000000..b88050a
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/Feature.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 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.biometrics.face;
+
+@VintfStability
+@Backing(type="byte")
+enum Feature {
+ /**
+ * Do not require the user to look at the device during enrollment and authentication. Note
+ * this is to accommodate people who have limited vision.
+ */
+ WAVE_ATTENTION_REQUIREMENT,
+
+ /**
+ * Do not require a diverse set of poses during enrollment. This is to accommodate people with
+ * limited mobility.
+ */
+ WAVE_DIVERSE_POSES_REQUIREMENT,
+
+ /**
+ * Enable debugging functionality.
+ */
+ DEBUG,
+}
+
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
index 34a1f8b..25ddd82 100644
--- a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
@@ -17,12 +17,12 @@
package android.hardware.biometrics.face;
import android.hardware.biometrics.common.ICancellationSignal;
+import android.hardware.biometrics.face.Feature;
import android.hardware.biometrics.face.EnrollmentType;
import android.hardware.keymaster.HardwareAuthToken;
import android.hardware.common.NativeHandle;
-/**
- * A session is a collection of immutable state (sensorId, userId), mutable state (SessionState),
+/** * A session is a collection of immutable state (sensorId, userId), mutable state (SessionState),
* methods available for the framework to call, and a callback (ISessionCallback) to notify the
* framework about the events and results. A session is used to establish communication between
* the framework and the HAL.
@@ -131,16 +131,17 @@
*
* @param cookie An identifier used to track subsystem operations related to this call path. The
* client must guarantee that it is unique per ISession.
+ * @param hat See above documentation.
* @param enrollmentType See the EnrollmentType enum.
+ * @param features See the Feature enum.
* @param previewSurface A surface provided by the framework if SensorProps#halControlsPreview is
* set to true. The HAL must send the preview frames to previewSurface if
* it's not null.
- * @param hat See above documentation.
* @return ICancellationSignal An object that can be used by the framework to cancel this
* operation.
*/
- ICancellationSignal enroll(in int cookie, in EnrollmentType enrollmentType,
- in HardwareAuthToken hat, in NativeHandle previewSurface);
+ ICancellationSignal enroll(in int cookie, in HardwareAuthToken hat, in EnrollmentType type,
+ in Feature[] features, in NativeHandle previewSurface);
/**
* authenticate:
@@ -266,6 +267,54 @@
void removeEnrollments(in int cookie, in int[] enrollmentIds);
/**
+ * getFeatures:
+ *
+ * Returns a list of currently enabled features for the provided enrollmentId.
+ *
+ * If the enrollmentId is invalid, the HAL must invoke ISessionCallback#onError with
+ * Error::UNABLE_TO_PROCESS and return to SessionState::IDLING if no subsequent work is in the
+ * queue.
+ *
+ * Once the HAL is able to start processing this request, it must notify the framework by using
+ * ISessionCallback#onStateChanged with SessionState::GETTING_FEATURES.
+ *
+ * The HAL must notify the framework about the result by calling
+ * ISessionCallback#onFeaturesRetrieved.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path. The
+ * client must guarantee that it is unique per ISession.
+ * @param enrollmentId the ID of the enrollment for which the features are requested.
+ */
+ void getFeatures(in int cookie, in int enrollmentId);
+
+ /**
+ * setFeature:
+ *
+ * Enables or disables a feature for the given enrollmentId. Because certain features may
+ * decrease security, the user must enter their password before this method is invoked
+ * (see @param hat). The HAL must verify the hat before changing any feature state.
+ *
+ * If either the hat or enrollmentId is invalid, the HAL must invoke ISessionCallback#onError
+ * with Error::UNABLE_TO_PROCESS and return to SessionState::IDLING if no subsequent work is in
+ * the queue.
+ *
+ * Once the HAL is able to start processing this request, it must notify the framework by using
+ * ISessionCallback#onStateChanged with SessionState::SETTING_FEATURE.
+ *
+ * After the feature is successfully set, the HAL must notify the framework by calling
+ * ISessionCallback#onFeatureSet.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path. The
+ * client must guarantee that it is unique per ISession.
+ * @param hat HardwareAuthToken See above documentation.
+ * @param enrollmentId the ID of the enrollment for which the feature update is requested.
+ * @param feature The feature to be enabled or disabled.
+ * @param enabled Whether the provided features should be enabled or disabled.
+ */
+ void setFeature(in int cookie, in HardwareAuthToken hat, in int enrollmentId,
+ in Feature feature, boolean enabled);
+
+ /**
* getAuthenticatorId:
*
* MUST return 0 via ISessionCallback#onAuthenticatorIdRetrieved for sensors that are configured
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl
index 9178e3a..354f4a7 100644
--- a/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl
@@ -17,6 +17,7 @@
package android.hardware.biometrics.face;
import android.hardware.biometrics.face.AcquiredInfo;
+import android.hardware.biometrics.face.Feature;
import android.hardware.biometrics.face.AuthenticationFrame;
import android.hardware.biometrics.face.EnrollmentFrame;
import android.hardware.biometrics.face.Error;
@@ -178,6 +179,26 @@
void onEnrollmentsEnumerated(in int[] enrollmentIds);
/**
+ * This method must only be used to notify the framework during SessionState::GETTING_FEATURES.
+ *
+ * Provides a list of features that are currently enabled for the given enrollmentId.
+ *
+ * @param features A list of currently enabled features. See the Feature enum.
+ * @param enrollmentId The enrollment for which the features were requested.
+ */
+ void onFeaturesRetrieved(in Feature[] features, in int enrollmentId);
+
+ /**
+ * This method must only be used to notify the framework during SessionState::SETTING_FEATURE.
+ *
+ * Notifies the framework that ISession#setFeature has completed.
+ *
+ * @param enrollmentId The enrollment for which a feature was set.
+ * @param feature The feature that was set.
+ */
+ void onFeatureSet(in int enrollmentId, Feature feature);
+
+ /**
* This method must only be used to notify the framework during
* SessionState::REMOVING_ENROLLMENTS.
*
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl
index e56f5d8..7675564 100644
--- a/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl
@@ -65,6 +65,16 @@
REMOVING_ENROLLMENTS,
/**
+ * The HAL is processing the ISession#getFeatures request.
+ */
+ GETTING_FEATURES,
+
+ /**
+ * The HAL is processing the ISession#setFeature request.
+ */
+ SETTING_FEATURE,
+
+ /**
* The HAL is processing the ISession#getAuthenticatorId request.
*/
GETTING_AUTHENTICATOR_ID,
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index df51879..63d1721 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -55,8 +55,9 @@
}
ndk::ScopedAStatus Session::enroll(
- int32_t /*cookie*/, biometrics::face::EnrollmentType /*enrollmentType*/,
- const keymaster::HardwareAuthToken& /*hat*/, const NativeHandle& /*previewSurface*/,
+ int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
+ EnrollmentType /*enrollmentType*/, const std::vector<Feature>& /*features*/,
+ const NativeHandle& /*previewSurface*/,
std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
return ndk::ScopedAStatus::ok();
}
@@ -94,6 +95,17 @@
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Session::getFeatures(int32_t /*cookie*/, int32_t /*enrollmentId*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::setFeature(int32_t /*cookie*/,
+ const keymaster::HardwareAuthToken& /*hat*/,
+ int32_t /*enrollmentId*/, Feature /*feature*/,
+ bool /*enabled*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
ndk::ScopedAStatus Session::getAuthenticatorId(int32_t /*cookie*/) {
if (cb_) {
cb_->onStateChanged(0, SessionState::GETTING_AUTHENTICATOR_ID);
diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h
index 347d202..83cb064 100644
--- a/biometrics/face/aidl/default/Session.h
+++ b/biometrics/face/aidl/default/Session.h
@@ -34,10 +34,10 @@
ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override;
- ndk::ScopedAStatus enroll(
- int32_t cookie, biometrics::face::EnrollmentType enrollmentType,
- const keymaster::HardwareAuthToken& hat, const NativeHandle& previewSurface,
- std::shared_ptr<biometrics::common::ICancellationSignal>* return_val) override;
+ ndk::ScopedAStatus enroll(int32_t cookie, const keymaster::HardwareAuthToken& hat,
+ EnrollmentType enrollmentType, const std::vector<Feature>& features,
+ const NativeHandle& previewSurface,
+ std::shared_ptr<common::ICancellationSignal>* return_val) override;
ndk::ScopedAStatus authenticate(
int32_t cookie, int64_t keystoreOperationId,
@@ -51,6 +51,11 @@
ndk::ScopedAStatus removeEnrollments(int32_t cookie,
const std::vector<int32_t>& enrollmentIds) override;
+ ndk::ScopedAStatus getFeatures(int32_t cookie, int32_t enrollmentId) override;
+
+ ndk::ScopedAStatus setFeature(int32_t cookie, const keymaster::HardwareAuthToken& hat,
+ int32_t enrollmentId, Feature feature, bool enabled) override;
+
ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;
ndk::ScopedAStatus invalidateAuthenticatorId(int32_t cookie) override;
diff --git a/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp
index 5b02a57..4cc8b4a 100644
--- a/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp
+++ b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp
@@ -103,6 +103,15 @@
return ndk::ScopedAStatus::ok();
}
+ ndk::ScopedAStatus onFeaturesRetrieved(const std::vector<Feature>& /*features*/,
+ int32_t /*enrollmentId*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onFeatureSet(int32_t /*enrollmentId*/, Feature /*feature*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
ndk::ScopedAStatus onAuthenticatorIdRetrieved(int64_t /*authenticatorId*/) override {
return ndk::ScopedAStatus::ok();
}
diff --git a/common/fmq/aidl/Android.bp b/common/fmq/aidl/Android.bp
index 004adab..9389712 100644
--- a/common/fmq/aidl/Android.bp
+++ b/common/fmq/aidl/Android.bp
@@ -9,6 +9,9 @@
srcs: [
"android/hardware/common/fmq/*.aidl",
],
+ imports: [
+ "android.hardware.common",
+ ],
stability: "vintf",
backend: {
java: {
diff --git a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl
index 7ac1930..0327796 100644
--- a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl
+++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl
@@ -2,13 +2,14 @@
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// 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 changes to the AIDL files built
+// 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
@@ -18,6 +19,7 @@
package android.hardware.common.fmq;
@VintfStability
parcelable GrantorDescriptor {
+ int fdIndex;
int offset;
long extent;
}
diff --git a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl
index 2607369..56f1de3 100644
--- a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl
+++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl
@@ -2,13 +2,14 @@
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// 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 changes to the AIDL files built
+// 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
@@ -19,7 +20,7 @@
@VintfStability
parcelable MQDescriptor {
android.hardware.common.fmq.GrantorDescriptor[] grantors;
- ParcelFileDescriptor fileDescriptor;
+ android.hardware.common.NativeHandle handle;
int quantum;
int flags;
}
diff --git a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl
index 2142bdb..264171d 100644
--- a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl
+++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl
@@ -2,13 +2,14 @@
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// 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 changes to the AIDL files built
+// 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
diff --git a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl
index 1220674..eaf2ffd 100644
--- a/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl
+++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl
@@ -2,13 +2,14 @@
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// 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 changes to the AIDL files built
+// 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
diff --git a/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl b/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl
index ca69d94..672415e 100644
--- a/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl
+++ b/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl
@@ -22,6 +22,10 @@
@VintfStability
parcelable GrantorDescriptor {
/*
+ * Index of file descriptor for this grantor
+ */
+ int fdIndex;
+ /*
* The offset of this descriptor in the shared memory in bytes.
*/
int offset;
diff --git a/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl b/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl
index 82917d6..46622f0 100644
--- a/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl
+++ b/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl
@@ -16,6 +16,7 @@
package android.hardware.common.fmq;
+import android.hardware.common.NativeHandle;
import android.hardware.common.fmq.GrantorDescriptor;
/*
@@ -34,8 +35,11 @@
* for blocking operations in the shared memory.
*/
GrantorDescriptor[] grantors;
- /* File descriptor for shared memory used in the message queue */
- ParcelFileDescriptor fileDescriptor;
+ /*
+ * NativeHandle that contains the file descriptors for shared memory used
+ * in the message queue
+ */
+ NativeHandle handle;
/* Size of each item, T, in bytes */
int quantum;
/* EventFlag word for blocking operations */
diff --git a/gnss/common/utils/default/Utils.cpp b/gnss/common/utils/default/Utils.cpp
index ccc7145..9bc6786 100644
--- a/gnss/common/utils/default/Utils.cpp
+++ b/gnss/common/utils/default/Utils.cpp
@@ -190,7 +190,7 @@
.tropoDelayMeters = 3.882265204404031},
.correlationVectors = {}};
- GnssClock clock = {.gnssClockFlags = GnssClock::HAS_FULL_BIAS | GnssClock::HAS_FULL_BIAS |
+ GnssClock clock = {.gnssClockFlags = GnssClock::HAS_FULL_BIAS | GnssClock::HAS_BIAS |
GnssClock::HAS_BIAS_UNCERTAINTY | GnssClock::HAS_DRIFT |
GnssClock::HAS_DRIFT_UNCERTAINTY,
.timeNs = 35854545000000,
diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal
index d475ed3..4eaf7be 100644
--- a/radio/1.6/types.hal
+++ b/radio/1.6/types.hal
@@ -284,6 +284,9 @@
* retry back-off time in milliseconds. Negative value indicates network does not give any
* suggestion. 0 indicates retry should be performed immediately. 0x7fffffffffffffff indicates
* the device should not retry data setup anymore.
+ *
+ * During this time, no calls to IRadio@1.6::SetupDataCall for this APN will be made unless
+ * IRadioIndication@1.6::unthrottleApn is sent with the same APN.
*/
int64_t suggestedRetryTime;
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthToken.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthToken.aidl
index ad5bf39..5858c77 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthToken.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthToken.aidl
@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.keymint;
-@VintfStability
+@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable HardwareAuthToken {
long challenge;
long userId;
diff --git a/security/keymint/aidl/android/hardware/security/keymint/HardwareAuthToken.aidl b/security/keymint/aidl/android/hardware/security/keymint/HardwareAuthToken.aidl
index 1067540..417a0b1 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/HardwareAuthToken.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/HardwareAuthToken.aidl
@@ -29,6 +29,7 @@
* appropriate for a given key operation.
*/
@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable HardwareAuthToken {
/**
* challenge is a value that's used to enable authentication tokens to authorize specific
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index d5f7a1f..1ca7713 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -26,7 +26,6 @@
import android.hardware.security.keymint.KeyMintHardwareInfo;
import android.hardware.security.keymint.KeyPurpose;
import android.hardware.security.keymint.SecurityLevel;
-import android.hardware.security.secureclock.TimeStampToken;
/**
* KeyMint device definition.
diff --git a/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/TimeStampToken.aidl b/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/TimeStampToken.aidl
index 51b1824..21eeb74 100644
--- a/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/TimeStampToken.aidl
+++ b/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/TimeStampToken.aidl
@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.secureclock;
-@VintfStability
+@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable TimeStampToken {
long challenge;
android.hardware.security.secureclock.Timestamp timestamp;
diff --git a/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/Timestamp.aidl b/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/Timestamp.aidl
index 50b8b9f..f01fdc7 100644
--- a/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/Timestamp.aidl
+++ b/security/secureclock/aidl/aidl_api/android.hardware.security.secureclock/current/android/hardware/security/secureclock/Timestamp.aidl
@@ -17,7 +17,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.security.secureclock;
-@VintfStability
+@RustDerive(Clone=true, Eq=true, Hash=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
parcelable Timestamp {
long milliSeconds;
}
diff --git a/security/secureclock/aidl/android/hardware/security/secureclock/TimeStampToken.aidl b/security/secureclock/aidl/android/hardware/security/secureclock/TimeStampToken.aidl
index b24d335..3fb5860 100644
--- a/security/secureclock/aidl/android/hardware/security/secureclock/TimeStampToken.aidl
+++ b/security/secureclock/aidl/android/hardware/security/secureclock/TimeStampToken.aidl
@@ -23,6 +23,7 @@
*/
@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable TimeStampToken {
/**
* The challenge that was provided as argument to ISecureClock.generateTimeStamp by the client.
diff --git a/security/secureclock/aidl/android/hardware/security/secureclock/Timestamp.aidl b/security/secureclock/aidl/android/hardware/security/secureclock/Timestamp.aidl
index 7bd1f9e..27758e1 100644
--- a/security/secureclock/aidl/android/hardware/security/secureclock/Timestamp.aidl
+++ b/security/secureclock/aidl/android/hardware/security/secureclock/Timestamp.aidl
@@ -23,6 +23,7 @@
* by setting the clock to zero during each boot, and then counting time accurately).
*/
@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true, Ord=true, PartialOrd=true, Hash=true)
parcelable Timestamp {
long milliSeconds;
}
diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal
index bd10237..0cf9c7c 100644
--- a/tests/msgq/1.0/ITestMsgQ.hal
+++ b/tests/msgq/1.0/ITestMsgQ.hal
@@ -41,12 +41,15 @@
*
* @param configureFmq The server sets up a new unsynchronized FMQ if
* this parameter is true.
+ * @param userFd True to initialize the message queue with a user supplied
+ * file descriptor for the ring buffer.
+ * False to let the message queue use a single FD for everything.
*
* @return ret True if successful.
* @return mqDesc This structure describes the unsynchronized FMQ that was
* set up by the service. Client can use it to set up the FMQ at its end.
*/
- getFmqUnsyncWrite(bool configureFmq) generates(bool ret, fmq_unsync<int32_t> mqDesc);
+ getFmqUnsyncWrite(bool configureFmq, bool userFd) generates(bool ret, fmq_unsync<int32_t> mqDesc);
/**
* This method request the service to write into the synchronized read/write
diff --git a/tests/msgq/1.0/default/Android.bp b/tests/msgq/1.0/default/Android.bp
index 6e7cd44..a50206b 100644
--- a/tests/msgq/1.0/default/Android.bp
+++ b/tests/msgq/1.0/default/Android.bp
@@ -91,9 +91,10 @@
// These are static libs only for testing purposes and portability. Shared
// libs should be used on device.
static_libs: [
+ "android.hardware.common-unstable-ndk_platform",
+ "android.hardware.common.fmq-unstable-ndk_platform",
"android.hardware.tests.msgq@1.0",
"android.fmq.test-ndk_platform",
- "android.hardware.common.fmq-unstable-ndk_platform",
],
whole_static_libs: [
"android.hardware.tests.msgq@1.0-impl",
diff --git a/tests/msgq/1.0/default/TestMsgQ.cpp b/tests/msgq/1.0/default/TestMsgQ.cpp
index 4473737..4726ffe 100644
--- a/tests/msgq/1.0/default/TestMsgQ.cpp
+++ b/tests/msgq/1.0/default/TestMsgQ.cpp
@@ -41,10 +41,19 @@
return true;
}
-Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) {
+Return<void> TestMsgQ::getFmqUnsyncWrite(bool configureFmq, bool userFd,
+ getFmqUnsyncWrite_cb _hidl_cb) {
if (configureFmq) {
static constexpr size_t kNumElementsInQueue = 1024;
- mFmqUnsynchronized.reset(new (std::nothrow) MessageQueueUnsync(kNumElementsInQueue));
+ static constexpr size_t kElementSizeBytes = sizeof(int32_t);
+ android::base::unique_fd ringbufferFd;
+ if (userFd) {
+ ringbufferFd.reset(
+ ::ashmem_create_region("UnsyncWrite", kNumElementsInQueue * kElementSizeBytes));
+ }
+ mFmqUnsynchronized.reset(new (std::nothrow) MessageQueueUnsync(
+ kNumElementsInQueue, false, std::move(ringbufferFd),
+ kNumElementsInQueue * kElementSizeBytes));
}
if ((mFmqUnsynchronized == nullptr) ||
(mFmqUnsynchronized->isValid() == false)) {
diff --git a/tests/msgq/1.0/default/TestMsgQ.h b/tests/msgq/1.0/default/TestMsgQ.h
index 8a204b7..49675fe 100644
--- a/tests/msgq/1.0/default/TestMsgQ.h
+++ b/tests/msgq/1.0/default/TestMsgQ.h
@@ -56,7 +56,8 @@
// Methods from ::android::hardware::tests::msgq::V1_0::ITestMsgQ follow.
Return<bool> configureFmqSyncReadWrite(const MQDescriptorSync<int32_t>& mqDesc) override;
- Return<void> getFmqUnsyncWrite(bool configureFmq, getFmqUnsyncWrite_cb _hidl_cb) override;
+ Return<void> getFmqUnsyncWrite(bool configureFmq, bool userFd,
+ getFmqUnsyncWrite_cb _hidl_cb) override;
Return<bool> requestWriteFmqSync(int32_t count) override;
Return<bool> requestReadFmqSync(int32_t count) override;
Return<bool> requestWriteFmqUnsync(int32_t count) override;
diff --git a/wifi/hostapd/1.3/vts/functional/hostapd_hidl_test.cpp b/wifi/hostapd/1.3/vts/functional/hostapd_hidl_test.cpp
index 4e63c56..fe9a183 100644
--- a/wifi/hostapd/1.3/vts/functional/hostapd_hidl_test.cpp
+++ b/wifi/hostapd/1.3/vts/functional/hostapd_hidl_test.cpp
@@ -81,10 +81,9 @@
virtual void TearDown() override {
HIDL_INVOKE_VOID_WITHOUT_ARGUMENTS(hostapd_, terminate);
- stopHostapd(wifi_instance_name_);
- // Wait 3 seconds to allow driver processing load/unload between two
- // test cases.
+ // Wait 3 seconds to allow terminate processing before kill hostapd.
sleep(3);
+ stopHostapd(wifi_instance_name_);
}
protected:
@@ -106,16 +105,6 @@
return status_and_name.second;
}
- // TODO: b/177483254, remove it after fix wlan1 failure case.
- std::string getPrimaryWlanIfaceName() {
- std::array<char, PROPERTY_VALUE_MAX> buffer;
- auto res = property_get("ro.vendor.wifi.sap.interface", buffer.data(),
- nullptr);
- if (res > 0) return buffer.data();
- property_get("wifi.interface", buffer.data(), "wlan0");
- return buffer.data();
- }
-
IHostapd::IfaceParams getIfaceParamsWithoutAcs(std::string iface_name) {
::android::hardware::wifi::hostapd::V1_0::IHostapd::IfaceParams
iface_params;
@@ -334,9 +323,7 @@
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithAcs) {
if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithAcs(ifname), getPskNwParams());
EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
@@ -348,9 +335,7 @@
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithAcsAndFreqRange) {
if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithAcsAndFreqRange(ifname),
getPskNwParams());
@@ -363,9 +348,7 @@
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithAcsAndInvalidFreqRange) {
if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithAcsAndInvalidFreqRange(ifname),
getPskNwParams());
@@ -378,9 +361,7 @@
*/
TEST_P(HostapdHidlTest, AddOpenAccessPointWithAcs) {
if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithAcs(ifname), getOpenNwParams());
EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
@@ -391,9 +372,7 @@
* Access point creation should pass.
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithoutAcs) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getPskNwParams());
@@ -405,9 +384,7 @@
* Access point creation should pass.
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithoutAcsAndNonMetered) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname),
getPskNwParamsWithNonMetered());
@@ -419,9 +396,7 @@
* Access point creation should pass.
*/
TEST_P(HostapdHidlTest, AddOpenAccessPointWithoutAcs) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getOpenNwParams());
@@ -434,9 +409,7 @@
*/
TEST_P(HostapdHidlTest, AddSaeTransitionAccessPointWithoutAcs) {
if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname),
getSaeTransitionNwParams());
@@ -449,9 +422,7 @@
*/
TEST_P(HostapdHidlTest, AddSAEAccessPointWithoutAcs) {
if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getSaeNwParams());
@@ -464,9 +435,7 @@
*/
TEST_P(HostapdHidlTest, RemoveAccessPointWithAcs) {
if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status_1_2 =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3, getIfaceParamsWithAcs(ifname),
getPskNwParams());
@@ -482,9 +451,7 @@
* Access point creation & removal should pass.
*/
TEST_P(HostapdHidlTest, RemoveAccessPointWithoutAcs) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status_1_2 =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getPskNwParams());
@@ -500,9 +467,7 @@
* Access point creation should fail.
*/
TEST_P(HostapdHidlTest, AddPskAccessPointWithInvalidChannel) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithInvalidChannel(ifname), getPskNwParams());
@@ -514,9 +479,7 @@
* Access point creation should fail.
*/
TEST_P(HostapdHidlTest, AddInvalidPskAccessPointWithoutAcs) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getInvalidPskNwParams());
@@ -529,9 +492,7 @@
*/
TEST_P(HostapdHidlTest, AddInvalidSaeTransitionAccessPointWithoutAcs) {
if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname),
getInvalidSaeTransitionNwParams());
@@ -544,9 +505,7 @@
*/
TEST_P(HostapdHidlTest, AddInvalidSaeAccessPointWithoutAcs) {
if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getInvalidSaeNwParams());
@@ -558,9 +517,7 @@
* when hotspot interface available.
*/
TEST_P(HostapdHidlTest, DisconnectClientWhenIfacAvailable) {
- // TODO: Use setupApIfaceAndGetName after fixing b/177483254
- // std::string ifname = setupApIfaceAndGetName(false);
- std::string ifname = getPrimaryWlanIfaceName();
+ std::string ifname = setupApIfaceAndGetName(false);
auto status_1_2 =
HIDL_INVOKE(hostapd_, addAccessPoint_1_3,
getIfaceParamsWithoutAcs(ifname), getOpenNwParams());