Merge "Move [generate|revoke]Challenge under ISession.aidl"
diff --git a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
index 687c70c..c09b265 100644
--- a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
+++ b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
@@ -34,11 +34,19 @@
authsecret = IAuthSecret::getService(GetParam());
ASSERT_NE(authsecret, nullptr);
+ // Notify LSS to generate PIN code '1234' and corresponding secret.
+ (void)system("cmd lock_settings set-pin 1234");
+
// All tests must enroll the correct secret first as this cannot be changed
// without a factory reset and the order of tests could change.
authsecret->primaryUserCredential(CORRECT_SECRET);
}
+ static void TearDownTestSuite() {
+ // clean up PIN code after testing
+ (void)system("cmd lock_settings clear --old 1234");
+ }
+
sp<IAuthSecret> authsecret;
hidl_vec<uint8_t> CORRECT_SECRET{61, 93, 124, 240, 5, 0, 7, 201, 9, 129, 11, 12, 0, 14, 0, 16};
hidl_vec<uint8_t> WRONG_SECRET{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index e3b559e..80a1831 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -1095,6 +1095,30 @@
{
.config =
{
+ .prop = toInt(VehicleProperty::POWER_POLICY_REQ),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+ },
+ {
+ .config =
+ {
+ .prop = toInt(VehicleProperty::POWER_POLICY_GROUP_REQ),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+ },
+ {
+ .config =
+ {
+ .prop = toInt(VehicleProperty::CURRENT_POWER_POLICY),
+ .access = VehiclePropertyAccess::READ_WRITE,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+ },
+ {
+ .config =
+ {
.prop = toInt(VehicleProperty::WATCHDOG_ALIVE),
.access = VehiclePropertyAccess::WRITE,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 11fe70e..931fee4 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -2921,6 +2921,65 @@
| VehicleArea:GLOBAL),
/**
+ * Defines a request to apply power policy.
+ *
+ * VHAL sets this property to change car power policy. Car power policy service subscribes to
+ * this property and actually changes the power policy.
+ * The request is made by setting the VehiclePropValue with the ID of a power policy which is
+ * defined at /vendor/etc/power_policy.xml. If the given ID is not defined, car power policy
+ * service ignores the request and the current power policy is maintained.
+ *
+ * string: "sample_policy_id" // power policy ID
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ */
+ POWER_POLICY_REQ = (
+ 0x0F21
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:STRING
+ | VehicleArea:GLOBAL),
+
+ /**
+ * Defines a request to set the power polic group used to decide a default power policy per
+ * power status transition.
+ *
+ * VHAL sets this property with the ID of a power policy group in order to set the default power
+ * policy applied at power status transition. Power policy groups are defined at
+ * /vendor/etc/power_policy.xml. If the given ID is not defined, car power policy service
+ * ignores the request.
+ * Car power policy service subscribes to this property and sets the power policy group.
+ * The actual application of power policy takes place when the system power status changes and
+ * there is a valid mapped power policy for the new power status.
+ *
+ * string: "sample_policy_group_id" // power policy group ID
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ */
+ POWER_POLICY_GROUP_REQ = (
+ 0x0F22
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:STRING
+ | VehicleArea:GLOBAL),
+
+ /**
+ * Notifies the current power policy to VHAL layer.
+ *
+ * Car power policy service sets this property when the current power policy is changed.
+ *
+ * string: "sample_policy_id" // power policy ID
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ_WRITE
+ */
+ CURRENT_POWER_POLICY = (
+ 0x0F23
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:STRING
+ | VehicleArea:GLOBAL),
+
+ /**
* Defines an event that car watchdog updates to tell it's alive.
*
* Car watchdog sets this property to system uptime in milliseconds at every 3 second.
@@ -2938,8 +2997,8 @@
/**
* Defines a process terminated by car watchdog and the reason of termination.
*
- * int32Values[0]: 1 // ProcessTerminationReason showing why a process is terminated.
- * string: "/system/bin/log" // Process execution command.
+ * int32Values[0]: 1 // ProcessTerminationReason showing why a process is terminated.
+ * string: "/system/bin/log" // Process execution command.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:WRITE
diff --git a/biometrics/face/aidl/Android.bp b/biometrics/face/aidl/Android.bp
new file mode 100644
index 0000000..4f8b71d
--- /dev/null
+++ b/biometrics/face/aidl/Android.bp
@@ -0,0 +1,22 @@
+aidl_interface {
+ name: "android.hardware.biometrics.face",
+ vendor_available: true,
+ srcs: [
+ "android/hardware/biometrics/face/**/*.aidl",
+ ],
+ imports: [
+ "android.hardware.biometrics.common",
+ "android.hardware.common",
+ "android.hardware.keymaster",
+ ],
+ stability: "vintf",
+ backend: {
+ java: {
+ enabled: false,
+ platform_apis: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+}
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
new file mode 100644
index 0000000..011b711
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@Backing(type="byte") @VintfStability
+enum AcquiredInfo {
+ GOOD = 0,
+ INSUFFICIENT = 1,
+ TOO_BRIGHT = 2,
+ TOO_DARK = 3,
+ TOO_CLOSE = 4,
+ TOO_FAR = 5,
+ FACE_TOO_HIGH = 6,
+ FACE_TOO_LOW = 7,
+ FACE_TOO_RIGHT = 8,
+ FACE_TOO_LEFT = 9,
+ POOR_GAZE = 10,
+ NOT_DETECTED = 11,
+ TOO_MUCH_MOTION = 12,
+ RECALIBRATE = 13,
+ TOO_DIFFERENT = 14,
+ TOO_SIMILAR = 15,
+ PAN_TOO_EXTREME = 16,
+ TILT_TOO_EXTREME = 17,
+ ROLL_TOO_EXTREME = 18,
+ FACE_OBSCURED = 19,
+ START = 20,
+ SENSOR_DIRTY = 21,
+ VENDOR = 22,
+}
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
new file mode 100644
index 0000000..15fcbf9
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@Backing(type="byte") @VintfStability
+enum Error {
+ HW_UNAVAILABLE = 1,
+ UNABLE_TO_PROCESS = 2,
+ TIMEOUT = 3,
+ NO_SPACE = 4,
+ CANCELED = 5,
+ UNABLE_TO_REMOVE = 6,
+ VENDOR = 8,
+}
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
new file mode 100644
index 0000000..943129e
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@Backing(type="byte") @VintfStability
+enum FaceSensorType {
+ RGB = 0,
+ IR = 1,
+}
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
new file mode 100644
index 0000000..518fb14
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/IFace.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@VintfStability
+interface IFace {
+ android.hardware.biometrics.face.SensorProps[] getSensorProps();
+ android.hardware.biometrics.face.ISession createSession(in int sensorId, in int userId, in android.hardware.biometrics.face.ISessionCallback cb);
+}
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
new file mode 100644
index 0000000..c9b443d
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@VintfStability
+interface ISession {
+ void generateChallenge(in int cookie, in int sensorId, in int userId, in int timeoutSec);
+ void revokeChallenge(in int cookie, in int sensorId, in int userId, in long challenge);
+ android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, 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 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
new file mode 100644
index 0000000..477ba5a
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISessionCallback.aidl
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@VintfStability
+interface ISessionCallback {
+ void onStateChanged(in int cookie, in android.hardware.biometrics.face.SessionState state);
+ void onChallengeGenerated(in int sensorId, in int userId, in long challenge);
+ void onChallengeRevoked(in int sensorId, in int userId, in long challenge);
+ void onAcquired(in android.hardware.biometrics.face.AcquiredInfo info, in int vendorCode);
+ void onError(in android.hardware.biometrics.face.Error error, in int vendorCode);
+ void onEnrollmentProgress(in int enrollmentId, int remaining);
+ void onAuthenticationSucceeded(in int enrollmentId, in android.hardware.keymaster.HardwareAuthToken hat);
+ void onAuthenticationFailed();
+ void onLockoutTimed(in long durationMillis);
+ void onLockoutPermanent();
+ void onLockoutCleared();
+ void onInteractionDetected();
+ void onEnrollmentsEnumerated(in int[] enrollmentIds);
+ void onEnrollmentsRemoved(in int[] enrollmentIds);
+ void onAuthenticatorIdRetrieved(in long authenticatorId);
+ void onAuthenticatorIdInvalidated();
+}
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
new file mode 100644
index 0000000..9f977f5
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SensorProps.aidl
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@VintfStability
+parcelable SensorProps {
+ android.hardware.biometrics.common.CommonProps commonProps;
+ android.hardware.biometrics.face.FaceSensorType sensorType;
+ boolean halControlsPreview;
+}
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
new file mode 100644
index 0000000..8e5139b
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/SessionState.aidl
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@Backing(type="byte") @VintfStability
+enum SessionState {
+ IDLING = 0,
+ TERMINATED = 1,
+ GENERATING_CHALLENGE = 2,
+ REVOKING_CHALLENGE = 3,
+ ENROLLING = 4,
+ AUTHENTICATING = 5,
+ DETECTING_INTERACTION = 6,
+ ENUMERATING_ENROLLMENTS = 7,
+ REMOVING_ENROLLMENTS = 8,
+ GETTING_AUTHENTICATOR_ID = 9,
+ INVALIDATING_AUTHENTICATOR_ID = 10,
+ RESETTING_LOCKOUT = 11,
+}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/AcquiredInfo.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/AcquiredInfo.aidl
new file mode 100644
index 0000000..fffb418
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/AcquiredInfo.aidl
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+@VintfStability
+@Backing(type="byte")
+enum AcquiredInfo {
+
+ /**
+ * The acquired face data was good, no further user interaction is necessary.
+ */
+ GOOD = 0,
+
+ /**
+ * The acquired face data was too noisy or did not have sufficient detail.
+ * This is a catch-all for all acquisition errors not captured by the other
+ * constants.
+ */
+ INSUFFICIENT = 1,
+
+ /**
+ * Because there was too much ambient light, the captured face data was too
+ * bright. It's reasonable to return this after multiple
+ * AcquiredInfo.INSUFFICIENT.
+ *
+ * The user is expected to take action to retry the operation in better
+ * lighting conditions when this is returned.
+ */
+ TOO_BRIGHT = 2,
+
+ /**
+ * Because there was not enough illumination, the captured face data was too
+ * dark. It's reasonable to return this after multiple
+ * AcquiredInfo.INSUFFICIENT.
+ *
+ * The user is expected to take action to retry the operation in better
+ * lighting conditions when this is returned.
+ */
+ TOO_DARK = 3,
+
+ /**
+ * The detected face is too close to the sensor, and the image cannot be
+ * processed.
+ *
+ * The user is expected to be informed to move further from the sensor when
+ * this is returned.
+ */
+ TOO_CLOSE = 4,
+
+ /**
+ * The detected face is too small, as the user might be too far away from
+ * the sensor.
+ *
+ * The user is expected to be informed to move closer to the sensor when
+ * this is returned.
+ */
+ TOO_FAR = 5,
+
+ /**
+ * Only the upper part of the face was detected. The sensor's field of view
+ * is too high.
+ *
+ * The user should be informed to move up with respect to the sensor when
+ * this is returned.
+ */
+ FACE_TOO_HIGH = 6,
+
+ /**
+ * Only the lower part of the face was detected. The sensor's field of view
+ * is too low.
+ *
+ * The user should be informed to move down with respect to the sensor when
+ * this is returned.
+ */
+ FACE_TOO_LOW = 7,
+
+ /**
+ * Only the right part of the face was detected. The sensor's field of view
+ * is too far right.
+ *
+ * The user should be informed to move to the right with respect to the
+ * sensor when this is returned.
+ */
+ FACE_TOO_RIGHT = 8,
+
+ /**
+ * Only the left part of the face was detected. The sensor's field of view
+ * is too far left.
+ *
+ * The user should be informed to move to the left with respect to the
+ * sensor when this is returned.
+ */
+ FACE_TOO_LEFT = 9,
+
+ /**
+ * The user's eyes have strayed away from the sensor. If this message is
+ * sent, the user should be informed to look at the device. If the user
+ * can't be found in the frame, one of the other acquisition messages
+ * must be sent, e.g. NOT_DETECTED.
+ */
+ POOR_GAZE = 10,
+
+ /**
+ * No face was detected within the sensor's field of view.
+ *
+ * The user should be informed to point the sensor to a face when this is
+ * returned.
+ */
+ NOT_DETECTED = 11,
+
+ /**
+ * Too much motion was detected.
+ *
+ * The user should be informed to keep their face steady relative to the
+ * sensor.
+ */
+ TOO_MUCH_MOTION = 12,
+
+ /**
+ * The sensor needs to be re-calibrated. This is an unexpected condition,
+ * and must only be sent if a serious, uncorrectable, and unrecoverable
+ * calibration issue is detected which requires user intervention, e.g.
+ * re-enrolling. The expected response to this message is to direct the
+ * user to re-enroll.
+ */
+ RECALIBRATE = 13,
+
+ /**
+ * The face is too different from a previous acquisition. This condition
+ * only applies to enrollment. This can happen if the user passes the
+ * device to someone else in the middle of enrollment.
+ */
+ TOO_DIFFERENT = 14,
+
+ /**
+ * The face is too similar to a previous acquisition. This condition only
+ * applies to enrollment. The user should change their pose.
+ */
+ TOO_SIMILAR = 15,
+
+ /**
+ * The magnitude of the pan angle of the user’s face with respect to the sensor’s
+ * capture plane is too high.
+ *
+ * The pan angle is defined as the angle swept out by the user’s face turning
+ * their neck left and right. The pan angle would be zero if the user faced the
+ * camera directly.
+ *
+ * The user should be informed to look more directly at the camera.
+ */
+ PAN_TOO_EXTREME = 16,
+
+ /**
+ * The magnitude of the tilt angle of the user’s face with respect to the sensor’s
+ * capture plane is too high.
+ *
+ * The tilt angle is defined as the angle swept out by the user’s face looking up
+ * and down. The tilt angle would be zero if the user faced the camera directly.
+ *
+ * The user should be informed to look more directly at the camera.
+ */
+ TILT_TOO_EXTREME = 17,
+
+ /**
+ * The magnitude of the roll angle of the user’s face with respect to the sensor’s
+ * capture plane is too high.
+ *
+ * The roll angle is defined as the angle swept out by the user’s face tilting their head
+ * towards their shoulders to the left and right. The roll angle would be zero if the user's
+ * head is vertically aligned with the camera.
+ *
+ * The user should be informed to look more directly at the camera.
+ */
+ ROLL_TOO_EXTREME = 18,
+
+ /**
+ * The user’s face has been obscured by some object.
+ *
+ * The user should be informed to remove any objects from the line of sight from
+ * the sensor to the user’s face.
+ */
+ FACE_OBSCURED = 19,
+
+ /**
+ * This message represents the earliest message sent at the beginning of the authentication
+ * pipeline. It is expected to be used to measure latency. For example, in a camera-based
+ * authentication system it's expected to be sent prior to camera initialization. Note this
+ * should be sent whenever authentication is restarted (see IBiometricsFace#userActivity).
+ * The framework will measure latency based on the time between the last START message and the
+ * onAuthenticated callback.
+ */
+ START = 20,
+
+ /**
+ * The sensor is dirty. The user should be informed to clean the sensor.
+ */
+ SENSOR_DIRTY = 21,
+
+ /**
+ * Vendor-specific acquisition message. See ISessionCallback#onAcquired vendorCode
+ * documentation.
+ */
+ VENDOR = 22
+}
+
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl
new file mode 100644
index 0000000..1d02456
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/Error.aidl
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+@VintfStability
+@Backing(type="byte")
+enum Error {
+ /**
+ * Reserved for testing and to keep subsequent numbering consistent with
+ * older interfaces.
+ *
+ * NO_ERROR = 0,
+ */
+
+ /**
+ * A hardware error has occurred that cannot be resolved. Try again later.
+ */
+ 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.
+ */
+ UNABLE_TO_PROCESS = 2,
+
+ /**
+ * The current operation took too long to complete. This is intended to
+ * prevent programs from blocking the face HAL indefinitely. The timeout is
+ * framework and sensor-specific, but is generally on the order of 30
+ * seconds.
+ *
+ * The timeout is a device-specific time meant to optimize power. For
+ * example after 30 seconds of searching for a face it can be use to
+ * indicate that the implementation is no longer looking and the framework
+ * should restart the operation on the next user interaction.
+ */
+ TIMEOUT = 3,
+
+ /**
+ * The current operation could not be completed because there is not enough
+ * storage space remaining to do so.
+ */
+ NO_SPACE = 4,
+
+ /**
+ * The current operation has been cancelled. This may happen if a new
+ * request (authenticate, remove, enumerate, enroll) is initiated while
+ * an on-going operation is in progress, or if cancel() was called.
+ */
+ CANCELED = 5,
+
+ /**
+ * The current remove operation could not be completed; the face template
+ * provided could not be removed.
+ */
+ UNABLE_TO_REMOVE = 6,
+
+ /**
+ * Reserved to maintain backwards compatibility. See
+ * ISessionCallback#onLockoutTimed instead.
+ *
+ * LOCKOUT = 7,
+ */
+
+ /**
+ * Used to enable a vendor-specific error message.
+ */
+ VENDOR = 8,
+
+ /**
+ * Reserved to maintain backwards compatibility. See
+ * ISessionCallback#onLockoutPermanent instead.
+ *
+ * LOCKOUT_PERMANENT = 9
+ */
+}
+
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/FaceSensorType.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/FaceSensorType.aidl
new file mode 100644
index 0000000..766f732
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/FaceSensorType.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+@VintfStability
+@Backing(type="byte")
+enum FaceSensorType {
+ RGB,
+ IR
+}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/IFace.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/IFace.aidl
new file mode 100644
index 0000000..e9a66e2
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/IFace.aidl
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+import android.hardware.biometrics.face.ISession;
+import android.hardware.biometrics.face.ISessionCallback;
+import android.hardware.biometrics.face.SensorProps;
+
+@VintfStability
+interface IFace {
+ /**
+ * getSensorProps:
+ *
+ * @return A list of properties for all face sensors available to the HAL.
+ */
+ SensorProps[] getSensorProps();
+
+ /**
+ * createSession:
+ *
+ * Creates a session that can be used by the framework to perform operations such as
+ * enroll, authenticate, etc. for the given sensorId and userId.
+ *
+ * Implementations must store user-specific state or metadata in /data/vendor_de/<user>/facedata
+ * as specified by the SELinux policy. The directory /data/vendor_de is managed by vold (see
+ * vold_prepare_subdirs.cpp). Implementations may store additional user-specific data, such as
+ * embeddings or templates in StrongBox.
+ *
+ * @param sensorId The sensorId with which this session is being created.
+ * @param userId The userId with which this session is being created.
+ * @param cb A callback to notify the framework about the session's results and events.
+ * @return A new session.
+ */
+ ISession createSession(in int sensorId, in int userId, in ISessionCallback cb);
+
+}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
new file mode 100644
index 0000000..5145b1e
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
@@ -0,0 +1,369 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+import android.hardware.biometrics.common.ICancellationSignal;
+import android.hardware.keymaster.HardwareAuthToken;
+import android.hardware.common.NativeHandle;
+
+/**
+ * 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.
+ */
+@VintfStability
+interface ISession {
+ /**
+ * generateChallenge:
+ *
+ * Begins a secure transaction request. Note that the challenge by itself is not useful. It only
+ * becomes useful when wrapped in a verifiable message such as a HardwareAuthToken.
+ *
+ * Canonical example:
+ * 1) User requests an operation, such as face enrollment.
+ * 2) Face enrollment cannot happen until the user confirms their lockscreen credential
+ * (PIN/Pattern/Password).
+ * 3) However, the biometric subsystem does not want just "any" proof of credential
+ * confirmation. It needs proof that the user explicitly authenticated credential in order
+ * to allow addition of biometric enrollments.
+ * To secure this path, the following path is taken:
+ * 1) Upon user requesting face enroll, the framework requests
+ * IFace#generateChallenge
+ * 2) Framework sends the challenge to the credential subsystem, and upon credential
+ * confirmation, a HAT is created, containing the challenge in the "challenge" field.
+ * 3) Framework sends the HAT to the HAL, e.g. ISession#enroll.
+ * 4) Implementation verifies the authenticity and integrity of the HAT.
+ * 5) Implementation now has confidence that the user entered their credential to allow
+ * biometric enrollment.
+ *
+ * Note that the interface allows multiple in-flight challenges. For example, invoking
+ * generateChallenge(0, 0, timeoutSec) twice does not invalidate the first challenge. The
+ * challenge is invalidated only when:
+ * 1) The provided timeout expires, or
+ * 2) IFace#revokeChallenge is invoked
+ *
+ * For example, the following is a possible table of valid challenges:
+ * ----------------------------------------------
+ * | SensorId | UserId | ValidUntil | Challenge |
+ * |----------|--------|------------|-----------|
+ * | 0 | 0 | <Time1> | <Random1> |
+ * | 0 | 0 | <Time2> | <Random2> |
+ * | 1 | 0 | <Time3> | <Random3> |
+ * | 0 | 10 | <Time4> | <Random4> |
+ * ----------------------------------------------
+ *
+ * @param cookie A unique number identifying this operation
+ * @param sensorId Sensor to associate the challenge with
+ * @param userId User to associate the challenge with
+ * @param timeoutSec Duration for which the challenge is valid for
+ */
+ void generateChallenge(in int cookie, in int sensorId, in int userId, in int timeoutSec);
+
+ /**
+ * revokeChallenge:
+ *
+ * Revokes a challenge that was previously generated. Note that if an invalid combination of
+ * parameters is requested, the implementation must still notify the framework using the
+ * provided callback.
+ *
+ * @param cookie A unique number identifying this operation
+ * @param sensorId Sensor that the revocation should apply to.
+ * @param userId User that the revocation should apply to.
+ * @param challenge Challenge that should be revoked.
+ */
+ void revokeChallenge(in int cookie, in int sensorId, in int userId, in long challenge);
+
+ /**
+ * enroll:
+ *
+ * A request to add a face enrollment.
+ *
+ * Once the HAL is able to start processing the enrollment request, it must notify the framework
+ * via ISessionCallback#onStateChanged with SessionState::ENROLLING.
+ *
+ * At any point during enrollment, if a non-recoverable error occurs, the HAL must notify the
+ * framework via ISessionCallback#onError with the applicable enrollment-specific error, and
+ * then send ISessionCallback#onStateChanged(cookie, SessionState::IDLING) if no subsequent
+ * operation is in the queue.
+ *
+ * Before capturing face data, the implementation must first verify the authenticity and
+ * integrity of the provided HardwareAuthToken. In addition, it must check that the challenge
+ * within the provided HardwareAuthToken is valid. See IFace#generateChallenge. If any of
+ * the above checks fail, the framework must be notified via ISessionCallback#onError and the
+ * HAL must notify the framework when it returns to the idle state. See
+ * Error::UNABLE_TO_PROCESS.
+ *
+ * During enrollment, the implementation may notify the framework via
+ * ISessionCallback#onAcquired with messages that may be used to guide the user. This callback
+ * can be invoked multiple times if necessary. Similarly, the framework may be notified of
+ * enrollment progress changes via ISessionCallback#onEnrollmentProgress. Once the framework is
+ * notified that there are 0 "remaining" steps, the framework may cache the "enrollmentId". See
+ * ISessionCallback#onEnrollmentProgress for more info. The HAL must notify the framework once
+ * it returns to the idle state.
+ *
+ * When a finger is successfully added and before the framework is notified of remaining=0, the
+ * implementation MUST update and associate this (sensorId, userId) pair with a new new
+ * entropy-encoded random identifier. See ISession#getAuthenticatorId for more information.
+ *
+ * @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 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 HardwareAuthToken hat, in NativeHandle previewSurface);
+
+ /**
+ * authenticate:
+ *
+ * A request to start looking for faces to authenticate.
+ *
+ * Once the HAL is able to start processing the authentication request, it must notify framework
+ * via ISessionCallback#onStateChanged with SessionState::AUTHENTICATING.
+ *
+ * At any point during authentication, if a non-recoverable error occurs, the HAL must notify
+ * the framework via ISessionCallback#onError with the applicable authentication-specific error,
+ * and then send ISessionCallback#onStateChanged(cookie, SessionState::IDLING) if no
+ * subsequent operation is in the queue.
+ *
+ * During authentication, the implementation may notify the framework via
+ * ISessionCallback#onAcquired with messages that may be used to guide the user. This callback
+ * can be invoked multiple times if necessary.
+ *
+ * The HAL must notify the framework of accepts/rejects via ISessionCallback#onAuthentication*.
+ *
+ * The authentication lifecycle ends when either
+ * 1) A face is accepted, and ISessionCallback#onAuthenticationSucceeded is invoked, or
+ * 2) Any non-recoverable error occurs (such as lockout). See the full list of
+ * authentication-specific errors in the Error enum.
+ *
+ * Note that upon successful authentication, the lockout counter for this (sensorId, userId)
+ * pair must be cleared.
+ *
+ * Note that upon successful authentication, ONLY sensors configured as SensorStrength::STRONG
+ * are allowed to create and send a HardwareAuthToken to the framework. See the Android CDD for
+ * more details. For SensorStrength::STRONG sensors, the HardwareAuthToken's "challenge" field
+ * must be set with the operationId passed in during #authenticate. If the sensor is NOT
+ * SensorStrength::STRONG, the HardwareAuthToken MUST be null.
+ *
+ * @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 operationId For sensors configured as SensorStrength::STRONG, this must be used ONLY
+ * upon successful authentication and wrapped in the HardwareAuthToken's
+ * "challenge" field and sent to the framework via
+ * ISessionCallback#onAuthenticated. The operationId is an opaque identifier
+ * created from a separate secure subsystem such as, but not limited to
+ * KeyStore/KeyMaster. The HardwareAuthToken can then be used as an
+ * attestation for the provided operation. For example, this is used
+ * to unlock biometric-bound auth-per-use keys (see
+ * setUserAuthenticationParameters in KeyGenParameterSpec.Builder and
+ * KeyProtection.Builder.
+ * @return ICancellationSignal An object that can be used by the framework to cancel this
+ * operation.
+ */
+ ICancellationSignal authenticate(in int cookie, in long operationId);
+
+ /**
+ * detectInteraction:
+ *
+ * A request to start looking for faces without performing matching.
+ *
+ * Once the HAL is able to start processing this request, it must notify the framework via
+ * ISessionCallback#onStateChanged with SessionState::DETECTING_INTERACTION.
+ *
+ * The framework will use this method in cases where determing user presence is required, but
+ * identifying/authentication is not. For example, when the device is encrypted (first boot) or
+ * in lockdown mode.
+ *
+ * At any point during detectInteraction, if a non-recoverable error occurs, the HAL must notify
+ * the framework via ISessionCallback#onError with the applicable error, and then send
+ * ISessionCallback#onStateChanged(cookie, SessionState::IDLING) if no subsequent operation is
+ * in the queue.
+ *
+ * The implementation must only check for a face-like image was detected (e.g. to
+ * minimize interactions due to non-face objects), and the lockout counter must not
+ * be modified.
+ *
+ * Upon detecting any face, the implementation must invoke
+ * ISessionCallback#onInteractionDetected.
+ *
+ * The lifecycle of this operation ends when either
+ * 1) Any face is detected and the framework is notified via
+ * ISessionCallback#onInteractiondetected
+ * 2) The operation was cancelled by the framework (see ICancellationSignal)
+ * 3) The HAL ends the operation, for example when a subsequent operation pre-empts this one.
+ *
+ * Note that if the operation is canceled, the implementation must notify the framework via
+ * ISessionCallback#onError with Error::CANCELED.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path.
+ * The framework will guarantee that it is unique per ISession.
+ * @return ICancellationSignal An object that can be used by the framework to cancel this
+ * operation.
+ */
+ ICancellationSignal detectInteraction(in int cookie);
+
+ /*
+ * enumerateEnrollments:
+ *
+ * A request to enumerate (list) the enrollments for this (sensorId, userId) pair. The
+ * framework typically uses this to ensure that its cache is in sync with the HAL.
+ *
+ * Once the HAL is able to start processing this request, it must notify the framework via
+ * ISessionCallback#onStateChanged with SessionState::ENUMERATING_ENROLLMENTS.
+ *
+ * The implementation must then notify the framework with a list of enrollments applicable
+ * for the current session via ISessionCallback#onEnrollmentsEnumerated.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path.
+ * The framework will guarantee that it is unique per ISession.
+ */
+ void enumerateEnrollments(in int cookie);
+
+ /**
+ * removeEnrollments:
+ *
+ * A request to remove the enrollments for this (sensorId, userId) pair.
+ *
+ * Once the HAL is able to start processing this request, it must notify the framework via
+ * ISessionCallback#onStateChanged with SessionState::REMOVING_ENROLLMENTS.
+ *
+ * After removing the enrollmentIds from everywhere necessary (filesystem, secure subsystems,
+ * etc), the implementation must notify the framework via ISessionCallback#onEnrollmentsRemoved.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path.
+ * The framework will guarantee that it is unique per ISession.
+ */
+ void removeEnrollments(in int cookie, in int[] enrollmentIds);
+
+ /**
+ * getAuthenticatorId:
+ *
+ * MUST return 0 via ISessionCallback#onAuthenticatorIdRetrieved for sensors that are configured
+ * as SensorStrength::WEAK or SensorStrength::CONVENIENCE.
+ *
+ * The following only applies to sensors that are configured as SensorStrength::STRONG.
+ *
+ * The authenticatorId is a (sensorId, user)-specific identifier which can be used during key
+ * generation and key import to to associate a key (in KeyStore / KeyMaster) with the current
+ * set of enrolled faces. For example, the following public Android APIs allow for keys
+ * to be invalidated when the user adds a new enrollment after the key was created:
+ * KeyGenParameterSpec.Builder.setInvalidatedByBiometricEnrollment and
+ * KeyProtection.Builder.setInvalidatedByBiometricEnrollment.
+ *
+ * In addition, upon successful face authentication, the signed HAT that is returned to
+ * the framework via ISessionCallback#onAuthenticated must contain this identifier in the
+ * authenticatorId field.
+ *
+ * Returns an entropy-encoded random identifier associated with the current set of enrollments
+ * via ISessionCallback#onAuthenticatorIdRetrieved. The authenticatorId
+ * 1) MUST change whenever a new face is enrolled
+ * 2) MUST return 0 if no faces are enrolled
+ * 3) MUST not change if a face is deleted.
+ * 4) MUST be an entropy-encoded random number
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path. The
+ * client must guarantee that it is unique per ISession.
+ */
+ void getAuthenticatorId(in int cookie);
+
+ /**
+ * invalidateAuthenticatorId:
+ *
+ * This method only applies to sensors that are configured as SensorStrength::STRONG. If invoked
+ * by the framework for sensor of other strengths, the HAL should immediately invoke
+ * ISessionCallback#onAuthenticatorIdInvalidated.
+ *
+ * The following only applies to sensors that are configured as SensorStrength::STRONG.
+ *
+ * When invoked by the framework, the implementation must perform the following sequence of
+ * events:
+ * 1) Verify the authenticity and integrity of the provided HAT. If this check fails, the HAL
+ * must invoke ISessionCallback#onError with Error::UNABLE_TO_PROCESS and return to
+ * SessionState::IDLING if no subsequent work is in the queue.
+ * 2) Verify that the timestamp provided within the HAT is relatively recent (e.g. on the
+ * order of minutes, not hours). If this check fails, the HAL must invoke
+ * ISessionCallback#onError with Error::UNABLE_TO_PROCESS and return to
+ * SessionState::IDLING if no subsequent work is in the queue.
+ * 3) Update the authenticatorId with a new entropy-encoded random number
+ * 4) Persist the new authenticatorId to non-ephemeral storage
+ * 5) Notify the framework that the above is completed, via
+ * ISessionCallback#onAuthenticatorInvalidated
+ *
+ * A practical use case of invalidation would be when the user adds a new enrollment to a sensor
+ * managed by a different HAL instance. The public android.security.keystore APIs bind keys to
+ * "all biometrics" rather than "face-only" or "face-only" (see #getAuthenticatorId
+ * for more details). As such, the framework would coordinate invalidation across multiple
+ * biometric HALs as necessary.
+ *
+ * @param cookie An identifier used to track subsystem operations related to this call path. The
+ * client must guarantee that it is unique per ISession.
+ */
+ void invalidateAuthenticatorId(in int cookie);
+
+ /**
+ * resetLockout:
+ *
+ * Requests the implementation to clear the lockout counter. Upon receiving this request, the
+ * implementation must perform the following:
+ * 1) Verify the authenticity and integrity of the provided HAT
+ * 2) Verify that the timestamp provided within the HAT is relatively recent (e.g. on the
+ * order of minutes, not hours).
+ * If either of the checks fail, the HAL must invoke ISessionCallback#onError with
+ * Error::UNABLE_TO_PROCESS and return to SessionState::IDLING if no subsequent work is in the
+ * queue.
+ *
+ * Upon successful verification, the HAL must clear the lockout counter and notify the framework
+ * via ISessionCallback#onLockoutCleared.
+ *
+ * Note that lockout is user AND sensor specific. In other words, there is a separate lockout
+ * state for each (user, sensor) pair. For example, the following is a valid state on a
+ * multi-sensor device:
+ * ------------------------------------------------------------------
+ * | SensorId | UserId | FailedAttempts | LockedOut | LockedUntil |
+ * |----------|--------|----------------|-----------|---------------|
+ * | 0 | 0 | 1 | false | x |
+ * | 1 | 0 | 5 | true | <future_time> |
+ * | 0 | 10 | 0 | false | x |
+ * | 1 | 10 | 0 | false | x |
+ * ------------------------------------------------------------------
+ *
+ * Lockout may be cleared in the following ways:
+ * 1) ISession#resetLockout
+ * 2) After a period of time, according to a rate-limiter.
+ *
+ * Note that the "FailedAttempts" counter must be cleared upon successful face
+ * authentication. For example, if SensorId=0 UserId=0 FailedAttempts=1, and a successful
+ * face authentication occurs, the counter for that (SensorId, UserId) pair must be reset
+ * to 0.
+ *
+ * In addition, lockout states MUST persist after device reboots, HAL crashes, etc.
+ *
+ * See the Android CDD section 7.3.10 for the full set of lockout and rate-limiting
+ * requirements.
+ *
+ * @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.
+ */
+ void resetLockout(in int cookie, in HardwareAuthToken hat);
+}
+
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl
new file mode 100644
index 0000000..2608d5f
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISessionCallback.aidl
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+import android.hardware.biometrics.face.AcquiredInfo;
+import android.hardware.biometrics.face.Error;
+import android.hardware.biometrics.face.SessionState;
+import android.hardware.keymaster.HardwareAuthToken;
+
+@VintfStability
+interface ISessionCallback {
+ /**
+ * Used to notify the framework of session state changes. See ISession for more information.
+ */
+ void onStateChanged(in int cookie, in SessionState state);
+
+ /**
+ * Notifies the framework when a challenge is successfully generated.
+ */
+ void onChallengeGenerated(in int sensorId, in int userId, in long challenge);
+
+ /**
+ * Notifies the framework when a challenge has been revoked.
+ */
+ void onChallengeRevoked(in int sensorId, in int userId, in long challenge);
+
+ /**
+ * This method must only be used to notify the framework during the following states:
+ * 1) SessionState::ENROLLING
+ * 2) SessionState::AUTHENTICATING
+ * 3) SessionState::DETECTING_INTERACTION
+ *
+ * These messages may be used to provide user guidance multiple times if necessary per
+ * operation.
+ *
+ * @param info See the AcquiredInfo enum.
+ * @param vendorCode Only valid if info == AcquiredInfo::VENDOR. The vendorCode must be used to
+ * index into the configuration
+ * com.android.internal.R.array.face_acquired_vendor that's installed
+ * on the vendor partition.
+ */
+ void onAcquired(in AcquiredInfo info, in int vendorCode);
+
+ /**
+ * This method must only be used to notify the framework during the following states:
+ * 1) SessionState::ENROLLING
+ * 2) SessionState::AUTHENTICATING
+ * 3) SessionState::DETECTING_INTERACTION
+ * 4) SessionState::INVALIDATING_AUTHENTICATOR_ID
+ * 5) SessionState::RESETTING_LOCKOUT
+ *
+ * These messages may be used to notify the framework or user that a non-recoverable error
+ * has occurred. The operation is finished, and the HAL must proceed with the next operation
+ * or return to SessionState::IDLING if the queue is empty.
+ *
+ * Note that cancellation (see common::ICancellationSignal) and preemption most be followed with
+ * an Error::CANCELED message.
+ *
+ * @param error See the Error enum.
+ * @param vendorCode Only valid if error == Error::VENDOR. The vendorCode must be used to index
+ * into the configuration
+ * com.android.internal.R.face_error_vendor that's installed on the
+ * vendor partition.
+ */
+ void onError(in Error error, in int vendorCode);
+
+ /**
+ * This method must only be used to notify the framework during the following state:
+ * 1) SessionState::ENROLLING
+ *
+ * @param enrollmentId Unique stable identifier for the enrollment that's being added by this
+ * ISession#enroll invocation.
+ * @param remaining Remaining number of steps before enrollment is complete.
+ */
+ void onEnrollmentProgress(in int enrollmentId, int remaining);
+
+ /**
+ * This method must only be used to notify the framework during SessionState::AUTHENTICATING.
+ *
+ * Used to notify the framework upon successful authentication. Note that the authentication
+ * lifecycle ends when either 1) a face is accepted, or 2) an error occurred. The
+ * authentication lifecycle does NOT end when a face is rejected.
+ *
+ * @param enrollmentId Face that was accepted.
+ * @param hat If the sensor is configured as SensorStrength::STRONG, a non-null attestation that
+ * a face was accepted. The HardwareAuthToken's "challenge" field must be set
+ * with the operationId passed in during ISession#authenticate. If the sensor is NOT
+ * SensorStrength::STRONG, the HardwareAuthToken MUST be null.
+ */
+ void onAuthenticationSucceeded(in int enrollmentId, in HardwareAuthToken hat);
+
+ /**
+ * This method must only be used to notify the framework during SessionState::AUTHENTICATING.
+ *
+ * Used to notify the framework upon rejected attempts. Note that the authentication
+ * lifecycle ends when either 1) a face is accepted, or 2) an occurred. The
+ * authentication lifecycle does NOT end when a face is rejected.
+ */
+ void onAuthenticationFailed();
+
+ /**
+ * This method must only be used to notify the framework during SessionState::AUTHENTICATING.
+ *
+ * Authentication is locked out due to too many unsuccessful attempts. This is a rate-limiting
+ * lockout, and authentication can be restarted after a period of time. See
+ * ISession#resetLockout.
+ *
+ * @param sensorId Sensor for which the user is locked out.
+ * @param userId User for which the sensor is locked out.
+ * @param durationMillis Remaining duration of the lockout.
+ */
+ void onLockoutTimed(in long durationMillis);
+
+ /**
+ * This method must only be used to notify the framework during SessionState::AUTHENTICATING.
+ *
+ * Authentication is disabled until the user unlocks with their device credential
+ * (PIN/Pattern/Password). See ISession#resetLockout.
+ *
+ * @param sensorId Sensor for which the user is locked out.
+ * @param userId User for which the sensor is locked out.
+ */
+ void onLockoutPermanent();
+
+ /**
+ * Notifies the framework that lockout has been cleared for this (sensorId, userId) pair.
+ *
+ * Note that this method can be used to notify the framework during any state.
+ *
+ * Lockout can be cleared in the following scenarios:
+ * 1) A timed lockout has ended (e.g. durationMillis specified in previous #onLockoutTimed
+ * has expired.
+ * 2) See ISession#resetLockout.
+ *
+ * @param sensorId Sensor for which the user's lockout is cleared.
+ * @param userId User for the sensor's lockout is cleared.
+ */
+ void onLockoutCleared();
+
+ /**
+ * This method must only be used to notify the framework during
+ * SessionState::DETECTING_INTERACTION
+ *
+ * Notifies the framework that user interaction occurred. See ISession#detectInteraction.
+ */
+ void onInteractionDetected();
+
+ /**
+ * This method must only be used to notify the framework during
+ * SessionState::ENUMERATING_ENROLLMENTS.
+ *
+ * Notifies the framework of the current enrollments. See ISession#enumerateEnrollments.
+ *
+ * @param enrollmentIds A list of enrollments for the session's (userId, sensorId) pair.
+ */
+ void onEnrollmentsEnumerated(in int[] enrollmentIds);
+
+ /**
+ * This method must only be used to notify the framework during
+ * SessionState::REMOVING_ENROLLMENTS.
+ *
+ * Notifies the framework that the specified enrollments are removed.
+ *
+ * @param enrollmentIds The enrollments that were removed.
+ */
+ void onEnrollmentsRemoved(in int[] enrollmentIds);
+
+ /**
+ * This method must only be used to notify the framework during
+ * SessionState::GETTING_AUTHENTICATOR_ID.
+ *
+ * Notifies the framework with the authenticatorId corresponding to this session's
+ * (userId, sensorId) pair.
+ *
+ * @param authenticatorId See the above documentation.
+ */
+ void onAuthenticatorIdRetrieved(in long authenticatorId);
+
+ /**
+ * This method must only be used to notify the framework during
+ * SessionState::INVALIDATING_AUTHENTICATOR_ID.
+ *
+ * See ISession#invalidateAuthenticatorId for more information.
+ */
+ void onAuthenticatorIdInvalidated();
+}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/SensorProps.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/SensorProps.aidl
new file mode 100644
index 0000000..53cc44e
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/SensorProps.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+import android.hardware.biometrics.common.CommonProps;
+import android.hardware.biometrics.face.FaceSensorType;
+
+@VintfStability
+parcelable SensorProps {
+ /**
+ * Statically configured properties that apply to this face sensor.
+ */
+ CommonProps commonProps;
+
+ /**
+ * A statically configured sensor type representing this face sensor.
+ */
+ FaceSensorType sensorType;
+
+ /**
+ * Whether or not the HAL is responsible for showing the face enrollment preview to the user.
+ * Devices with multiple front camera sensors can set this to false and rely on the framework to
+ * show the preview with one of the unused cameras. Devices with a single front sensor must set
+ * this to true and configure their send their camera stream to the preview surface provided by
+ * the framework.
+ */
+ boolean halControlsPreview;
+}
+
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl
new file mode 100644
index 0000000..1878f7c
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/SessionState.aidl
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.biometrics.face;
+
+@VintfStability
+@Backing(type="byte")
+enum SessionState {
+ /**
+ * The HAL is not processing any session requests.
+ */
+ IDLING,
+
+ /**
+ * The session has been terminated by the HAL.
+ */
+ TERMINATED,
+
+ /**
+ * The HAL is processing the ISession#generateChallenge request.
+ */
+ GENERATING_CHALLENGE,
+
+ /**
+ * The HAL is processing the ISession#revokeChallenge request.
+ */
+ REVOKING_CHALLENGE,
+
+ /**
+ * The HAL is processing the ISession#enroll request.
+ */
+ ENROLLING,
+
+ /**
+ * The HAL is processing the ISession#authenticate request.
+ */
+ AUTHENTICATING,
+
+ /**
+ * The HAL is processing the ISession#detectInteraction request.
+ */
+ DETECTING_INTERACTION,
+
+ /**
+ * The HAL is processing the ISession#enumerateEnrollments request.
+ */
+ ENUMERATING_ENROLLMENTS,
+
+ /**
+ * The HAL is processing the ISession#removeEnrollments request.
+ */
+ REMOVING_ENROLLMENTS,
+
+ /**
+ * The HAL is processing the ISession#getAuthenticatorId request.
+ */
+ GETTING_AUTHENTICATOR_ID,
+
+ /**
+ * The HAL is processing the ISession#invalidateAuthenticatorId request.
+ */
+ INVALIDATING_AUTHENTICATOR_ID,
+
+ /**
+ * The HAL is processing the ISession#resetLockout request.
+ */
+ RESETTING_LOCKOUT
+}
+
diff --git a/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
new file mode 100644
index 0000000..51a8ef4
--- /dev/null
+++ b/biometrics/face/aidl/default/Android.bp
@@ -0,0 +1,18 @@
+cc_binary {
+ name: "android.hardware.biometrics.face-service.example",
+ relative_install_path: "hw",
+ init_rc: ["face-default.rc"],
+ vintf_fragments: ["face-default.xml"],
+ vendor: true,
+ shared_libs: [
+ "libbase",
+ "libbinder_ndk",
+ "android.hardware.biometrics.face-ndk_platform",
+ "android.hardware.biometrics.common-unstable-ndk_platform",
+ ],
+ srcs: [
+ "main.cpp",
+ "Face.cpp",
+ "Session.cpp",
+ ],
+}
diff --git a/biometrics/face/aidl/default/Face.cpp b/biometrics/face/aidl/default/Face.cpp
new file mode 100644
index 0000000..1526245
--- /dev/null
+++ b/biometrics/face/aidl/default/Face.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Face.h"
+#include "Session.h"
+
+namespace aidl::android::hardware::biometrics::face {
+
+const int kSensorId = 0;
+const common::SensorStrength kSensorStrength = common::SensorStrength::WEAK;
+const int kMaxEnrollmentsPerUser = 5;
+const FaceSensorType kSensorType = FaceSensorType::RGB;
+const bool kHalControlsPreview = true;
+const std::string kHwDeviceName = "faceSensor";
+const std::string kHardwareVersion = "vendor/model/revision";
+const std::string kFirmwareVersion = "1.01";
+const std::string kSerialNumber = "00000001";
+
+ndk::ScopedAStatus Face::getSensorProps(std::vector<SensorProps>* return_val) {
+ common::HardwareInfo hardware_info;
+ hardware_info.deviceName = kHwDeviceName;
+ hardware_info.hardwareVersion = kHardwareVersion;
+ hardware_info.firmwareVersion = kFirmwareVersion;
+ hardware_info.serialNumber = kSerialNumber;
+
+ common::CommonProps commonProps;
+ commonProps.sensorId = kSensorId;
+ commonProps.sensorStrength = kSensorStrength;
+ commonProps.maxEnrollmentsPerUser = kMaxEnrollmentsPerUser;
+ commonProps.hardwareInfo = {std::move(hardware_info)};
+
+ SensorProps props;
+ props.commonProps = std::move(commonProps);
+ props.sensorType = kSensorType;
+ props.halControlsPreview = kHalControlsPreview;
+
+ *return_val = {std::move(props)};
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Face::createSession(int32_t /*sensorId*/, int32_t /*userId*/,
+ const std::shared_ptr<ISessionCallback>& cb,
+ std::shared_ptr<ISession>* return_val) {
+ *return_val = SharedRefBase::make<Session>(cb);
+ return ndk::ScopedAStatus::ok();
+}
+
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Face.h b/biometrics/face/aidl/default/Face.h
new file mode 100644
index 0000000..786b4f8
--- /dev/null
+++ b/biometrics/face/aidl/default/Face.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <aidl/android/hardware/biometrics/face/BnFace.h>
+
+namespace aidl::android::hardware::biometrics::face {
+
+class Face : public BnFace {
+ public:
+ ndk::ScopedAStatus getSensorProps(std::vector<SensorProps>* _aidl_return) override;
+
+ ndk::ScopedAStatus createSession(int32_t sensorId, int32_t userId,
+ const std::shared_ptr<ISessionCallback>& cb,
+ std::shared_ptr<ISession>* _aidl_return) override;
+};
+
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
new file mode 100644
index 0000000..bb895b7
--- /dev/null
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <aidl/android/hardware/biometrics/common/BnCancellationSignal.h>
+
+#include "Session.h"
+
+namespace aidl::android::hardware::biometrics::face {
+
+class CancellationSignal : public common::BnCancellationSignal {
+ public:
+ ndk::ScopedAStatus cancel() override { return ndk::ScopedAStatus::ok(); }
+};
+
+Session::Session(std::shared_ptr<ISessionCallback> cb) : cb_(std::move(cb)) {}
+
+ndk::ScopedAStatus Session::generateChallenge(int32_t /*cookie*/, int32_t /*sensorId*/,
+ int32_t /*userId*/, int32_t /*timeoutSec*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int32_t /*sensorId*/,
+ int32_t /*userId*/, int64_t /*challenge*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::enroll(int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
+ const NativeHandle& /*previewSurface*/,
+ std::shared_ptr<biometrics::common::ICancellationSignal>*
+ /*returnVal*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::authenticate(int32_t /*cookie*/, int64_t /*keystoreOperationId*/,
+ std::shared_ptr<common::ICancellationSignal>* return_val) {
+ if (cb_) {
+ cb_->onStateChanged(0, SessionState::AUTHENTICATING);
+ }
+ *return_val = SharedRefBase::make<CancellationSignal>();
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::detectInteraction(
+ int32_t /*cookie*/, std::shared_ptr<common::ICancellationSignal>* /*return_val*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::enumerateEnrollments(int32_t /*cookie*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::removeEnrollments(int32_t /*cookie*/,
+ const std::vector<int32_t>& /*enrollmentIds*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::getAuthenticatorId(int32_t /*cookie*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::invalidateAuthenticatorId(int32_t /*cookie*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::resetLockout(int32_t /*cookie*/,
+ const keymaster::HardwareAuthToken& /*hat*/) {
+ return ndk::ScopedAStatus::ok();
+}
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h
new file mode 100644
index 0000000..a91ad81
--- /dev/null
+++ b/biometrics/face/aidl/default/Session.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <aidl/android/hardware/biometrics/face/BnSession.h>
+#include <aidl/android/hardware/biometrics/face/ISessionCallback.h>
+
+namespace aidl::android::hardware::biometrics::face {
+
+namespace common = aidl::android::hardware::biometrics::common;
+namespace keymaster = aidl::android::hardware::keymaster;
+
+using aidl::android::hardware::common::NativeHandle;
+
+class Session : public BnSession {
+ public:
+ explicit Session(std::shared_ptr<ISessionCallback> cb);
+
+ ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t sensorId, int32_t userId,
+ int32_t timeoutSec) override;
+
+ ndk::ScopedAStatus revokeChallenge(int32_t cookie, int32_t sensorId, int32_t userId,
+ int64_t challenge) override;
+
+ ndk::ScopedAStatus enroll(
+ int32_t cookie, const keymaster::HardwareAuthToken& hat,
+ const NativeHandle& previewSurface,
+ std::shared_ptr<biometrics::common::ICancellationSignal>* returnVal) override;
+
+ ndk::ScopedAStatus authenticate(
+ int32_t cookie, int64_t keystoreOperationId,
+ std::shared_ptr<common::ICancellationSignal>* returnVal) override;
+
+ ndk::ScopedAStatus detectInteraction(
+ int32_t cookie, std::shared_ptr<common::ICancellationSignal>* returnVal) override;
+
+ ndk::ScopedAStatus enumerateEnrollments(int32_t cookie) override;
+
+ ndk::ScopedAStatus removeEnrollments(int32_t cookie,
+ const std::vector<int32_t>& enrollmentIds) override;
+
+ ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;
+
+ ndk::ScopedAStatus invalidateAuthenticatorId(int32_t cookie) override;
+
+ ndk::ScopedAStatus resetLockout(int32_t cookie,
+ const keymaster::HardwareAuthToken& hat) override;
+
+ private:
+ std::shared_ptr<ISessionCallback> cb_;
+};
+
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/face-default.rc b/biometrics/face/aidl/default/face-default.rc
new file mode 100644
index 0000000..f6499f0
--- /dev/null
+++ b/biometrics/face/aidl/default/face-default.rc
@@ -0,0 +1,5 @@
+service vendor.face-default /vendor/bin/hw/android.hardware.biometrics.face-service.example
+ class hal
+ user nobody
+ group nobody
+
diff --git a/biometrics/face/aidl/default/face-default.xml b/biometrics/face/aidl/default/face-default.xml
new file mode 100644
index 0000000..6915ad0
--- /dev/null
+++ b/biometrics/face/aidl/default/face-default.xml
@@ -0,0 +1,6 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl">
+ <name>android.hardware.biometrics.face</name>
+ <fqname>IFace/default</fqname>
+ </hal>
+</manifest>
diff --git a/biometrics/face/aidl/default/main.cpp b/biometrics/face/aidl/default/main.cpp
new file mode 100644
index 0000000..80b153e
--- /dev/null
+++ b/biometrics/face/aidl/default/main.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Face.h"
+
+#include <android-base/logging.h>
+#include <android/binder_manager.h>
+#include <android/binder_process.h>
+
+using aidl::android::hardware::biometrics::face::Face;
+
+int main() {
+ LOG(INFO) << "Face HAL started";
+ ABinderProcess_setThreadPoolMaxThreadCount(0);
+ std::shared_ptr<Face> hal = ndk::SharedRefBase::make<Face>();
+
+ const std::string instance = std::string(Face::descriptor) + "/default";
+ binder_status_t status = AServiceManager_addService(hal->asBinder().get(), instance.c_str());
+ CHECK(status == STATUS_OK);
+
+ ABinderProcess_joinThreadPool();
+ return EXIT_FAILURE; // should not reach
+}
diff --git a/biometrics/face/aidl/vts/Android.bp b/biometrics/face/aidl/vts/Android.bp
new file mode 100644
index 0000000..427b878
--- /dev/null
+++ b/biometrics/face/aidl/vts/Android.bp
@@ -0,0 +1,16 @@
+cc_test {
+ name: "VtsHalBiometricsFaceTargetTest",
+ defaults: [
+ "VtsHalTargetTestDefaults",
+ "use_libaidlvintf_gtest_helper_static",
+ ],
+ srcs: ["VtsHalBiometricsFaceTargetTest.cpp"],
+ shared_libs: [
+ "libbinder_ndk",
+ "android.hardware.biometrics.face-ndk_platform",
+ ],
+ test_suites: [
+ "general-tests",
+ "vts",
+ ],
+}
diff --git a/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp
new file mode 100644
index 0000000..c1ba66b
--- /dev/null
+++ b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+#include <aidl/android/hardware/biometrics/face/BnFace.h>
+#include <aidl/android/hardware/biometrics/face/BnSessionCallback.h>
+
+#include <android/binder_manager.h>
+#include <android/binder_process.h>
+
+#include <future>
+
+namespace aidl::android::hardware::biometrics::face {
+namespace {
+
+constexpr int kSensorId = 0;
+constexpr int kUserId = 0;
+constexpr auto kCallbackTimeout = std::chrono::seconds(1);
+
+enum class SessionCallbackMethodName {
+ kOnStateChanged,
+};
+
+struct SessionCallbackInvocation {
+ SessionCallbackMethodName method_name;
+ SessionState state;
+};
+
+class SessionCallback : public BnSessionCallback {
+ public:
+ explicit SessionCallback(std::promise<SessionCallbackInvocation> invocation_promise)
+ : invocation_promise_(std::move(invocation_promise)) {}
+ ndk::ScopedAStatus onStateChanged(int32_t /*cookie*/, SessionState state) override {
+ SessionCallbackInvocation invocation = {};
+ invocation.method_name = SessionCallbackMethodName::kOnStateChanged;
+ invocation.state = state;
+ invocation_promise_.set_value(invocation);
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onChallengeGenerated(int32_t /*sensorId*/, int32_t /*userId*/,
+ int64_t /*challenge*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onChallengeRevoked(int32_t /*sensorId*/, int32_t /*userId*/,
+ int64_t /*challenge*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onAcquired(AcquiredInfo /*info*/, int32_t /*vendorCode*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onError(Error /*error*/, int32_t /*vendorCode*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onEnrollmentProgress(int32_t /*enrollmentId*/,
+ int32_t /*remaining*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onAuthenticationSucceeded(
+ int32_t /*enrollmentId*/, const keymaster::HardwareAuthToken& /*hat*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onAuthenticationFailed() override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus onLockoutTimed(int64_t /*durationMillis*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onLockoutPermanent() override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus onLockoutCleared() override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus onInteractionDetected() override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus onEnrollmentsEnumerated(
+ const std::vector<int32_t>& /*enrollmentIds*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onEnrollmentsRemoved(
+ const std::vector<int32_t>& /*enrollmentIds*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onAuthenticatorIdRetrieved(int64_t /*authenticatorId*/) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus onAuthenticatorIdInvalidated() override { return ndk::ScopedAStatus::ok(); }
+
+ private:
+ std::promise<SessionCallbackInvocation> invocation_promise_;
+};
+
+class Face : public testing::TestWithParam<std::string> {
+ protected:
+ void SetUp() override {
+ AIBinder* binder = AServiceManager_waitForService(GetParam().c_str());
+ ASSERT_NE(binder, nullptr);
+ hal_ = IFace::fromBinder(ndk::SpAIBinder(binder));
+ }
+
+ std::shared_ptr<IFace> hal_;
+};
+
+TEST_P(Face, AuthenticateTest) {
+ std::promise<SessionCallbackInvocation> invocation_promise;
+ std::future<SessionCallbackInvocation> invocation_future = invocation_promise.get_future();
+ std::shared_ptr<SessionCallback> session_cb =
+ ndk::SharedRefBase::make<SessionCallback>(std::move(invocation_promise));
+
+ std::shared_ptr<ISession> session;
+ ASSERT_TRUE(hal_->createSession(kSensorId, kUserId, session_cb, &session).isOk());
+
+ std::shared_ptr<common::ICancellationSignal> cancel_cb;
+ ASSERT_TRUE(session->authenticate(0, 0, &cancel_cb).isOk());
+ ASSERT_EQ(invocation_future.wait_for(kCallbackTimeout), std::future_status::ready);
+
+ SessionCallbackInvocation invocation = invocation_future.get();
+ EXPECT_EQ(invocation.method_name, SessionCallbackMethodName::kOnStateChanged);
+ EXPECT_EQ(invocation.state, SessionState::AUTHENTICATING);
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(Face);
+INSTANTIATE_TEST_SUITE_P(IFace, Face,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IFace::descriptor)),
+ ::android::PrintInstanceNameToString);
+
+} // namespace
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ ABinderProcess_setThreadPoolMaxThreadCount(1);
+ ABinderProcess_startThreadPool();
+ return RUN_ALL_TESTS();
+}
+
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index b321248..d1d254b 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -96,6 +96,13 @@
<instance>default</instance>
</interface>
</hal>
+ <hal format="aidl" optional="true">
+ <name>android.hardware.biometrics.face</name>
+ <interface>
+ <name>IFace</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
<hal format="hidl" optional="true">
<name>android.hardware.biometrics.fingerprint</name>
<version>2.1-3</version>
diff --git a/current.txt b/current.txt
index 9f03b7f..d8ca42c 100644
--- a/current.txt
+++ b/current.txt
@@ -780,7 +780,3 @@
# NOTE: new HALs are recommended to be in AIDL
6e64b33f1b720b66b0deb5e08dee37a99deaa94e2e9ebf7806703cabab56e21d android.hardware.contexthub@1.2::IContexthub
3fb83f4539cab2c7bf9fdbecf7265d1c1dd6e8de9694046fe512b493c127ccea android.hardware.contexthub@1.2::types
-57d183b10b13ec0a8e542c0b3d61991ae541c60e85dbbc5499bb21dfd068cbb8 android.hardware.wifi.supplicant@1.4::types
-17818b6b1952a75e4364ae82c534b9d2f5c0a9765a56256b16faa5a5cf45d3a8 android.hardware.wifi.supplicant@1.4::ISupplicant
-8342b5f6ec8f48ad2b741128aede010995d0b5709257b7ec09bb469b4f61ef1a android.hardware.wifi.supplicant@1.4::ISupplicantStaIface
-6f969b191f0b699ceab0573548f1ac505853e56e704711edc51b51976d4f87ad android.hardware.wifi.supplicant@1.4::ISupplicantStaNetwork
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/BlocklistedSource.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/BlocklistedSource.aidl
new file mode 100644
index 0000000..89f5d53
--- /dev/null
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/BlocklistedSource.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.gnss;
+@VintfStability
+parcelable BlocklistedSource {
+ android.hardware.gnss.GnssConstellationType constellation;
+ int svid;
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssConstellationType.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssConstellationType.aidl
new file mode 100644
index 0000000..30d0227
--- /dev/null
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssConstellationType.aidl
@@ -0,0 +1,29 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.gnss;
+@Backing(type="int") @VintfStability
+enum GnssConstellationType {
+ UNKNOWN = 0,
+ GPS = 1,
+ SBAS = 2,
+ GLONASS = 3,
+ QZSS = 4,
+ BEIDOU = 5,
+ GALILEO = 6,
+ IRNSS = 7,
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
index 33377ca..146577e 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
@@ -18,5 +18,9 @@
package android.hardware.gnss;
@VintfStability
interface IGnss {
+ void setCallback(in android.hardware.gnss.IGnssCallback callback);
+ void close();
android.hardware.gnss.IGnssPsds getExtensionPsds();
+ android.hardware.gnss.IGnssConfiguration getExtensionGnssConfiguration();
+ const int ERROR_INVALID_ARGUMENT = 1;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl
new file mode 100644
index 0000000..62870d6
--- /dev/null
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.gnss;
+@VintfStability
+interface IGnssCallback {
+ void gnssSetCapabilitiesCb(in int capabilities);
+ const int CAPABILITY_SATELLITE_BLOCKLIST = 1;
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl
new file mode 100644
index 0000000..5af30cf
--- /dev/null
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.gnss;
+@VintfStability
+interface IGnssConfiguration {
+ void setSuplVersion(in int version);
+ void setSuplMode(in int mode);
+ void setLppProfile(in int lppProfile);
+ void setGlonassPositioningProtocol(in int protocol);
+ void setEmergencySuplPdn(in boolean enable);
+ void setEsExtensionSec(in int emergencyExtensionSeconds);
+ void setBlocklist(in android.hardware.gnss.BlocklistedSource[] blocklist);
+ const int SUPL_MODE_MSB = 1;
+ const int SUPL_MODE_MSA = 2;
+ const int LPP_PROFILE_USER_PLANE = 1;
+ const int LPP_PROFILE_CONTROL_PLANE = 2;
+ const int GLONASS_POS_PROTOCOL_RRC_CPLANE = 1;
+ const int GLONASS_POS_PROTOCOL_RRLP_UPLANE = 2;
+ const int GLONASS_POS_PROTOCOL_LPP_UPLANE = 4;
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPsds.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPsds.aidl
index 352a694..ddef928 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPsds.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPsds.aidl
@@ -18,6 +18,6 @@
package android.hardware.gnss;
@VintfStability
interface IGnssPsds {
- boolean injectPsdsData(in android.hardware.gnss.PsdsType psdsType, in byte[] psdsData);
- boolean setCallback(in android.hardware.gnss.IGnssPsdsCallback callback);
+ void injectPsdsData(in android.hardware.gnss.PsdsType psdsType, in byte[] psdsData);
+ void setCallback(in android.hardware.gnss.IGnssPsdsCallback callback);
}
diff --git a/gnss/aidl/android/hardware/gnss/BlocklistedSource.aidl b/gnss/aidl/android/hardware/gnss/BlocklistedSource.aidl
new file mode 100644
index 0000000..2fde5b2
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/BlocklistedSource.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss;
+
+import android.hardware.gnss.GnssConstellationType;
+
+/**
+ * Represents a blocklisted source.
+ */
+@VintfStability
+parcelable BlocklistedSource {
+ /**
+ * Defines the constellation of the given satellite(s).
+ */
+ GnssConstellationType constellation;
+
+ /**
+ * Satellite (space vehicle) ID number, as defined in GnssSvInfo::svid, or 0 to blocklist all
+ * svid's for the specified constellation.
+ */
+ int svid;
+}
\ No newline at end of file
diff --git a/gnss/aidl/android/hardware/gnss/GnssConstellationType.aidl b/gnss/aidl/android/hardware/gnss/GnssConstellationType.aidl
new file mode 100644
index 0000000..af3e089
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/GnssConstellationType.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss;
+
+/**
+ * GNSS constellation type
+ *
+ * This is to specify the navigation satellite system, for example, as listed in Section 3.5 in
+ * RINEX Version 3.04.
+ */
+@VintfStability
+@Backing(type="int")
+enum GnssConstellationType {
+ UNKNOWN = 0,
+ /** Global Positioning System. */
+ GPS = 1,
+ /** Satellite-Based Augmentation System. */
+ SBAS = 2,
+ /** Global Navigation Satellite System. */
+ GLONASS = 3,
+ /** Quasi-Zenith Satellite System. */
+ QZSS = 4,
+ /** BeiDou Navigation Satellite System. */
+ BEIDOU = 5,
+ /** Galileo Navigation Satellite System. */
+ GALILEO = 6,
+ /** Indian Regional Navigation Satellite System. */
+ IRNSS = 7,
+}
\ No newline at end of file
diff --git a/gnss/aidl/android/hardware/gnss/IGnss.aidl b/gnss/aidl/android/hardware/gnss/IGnss.aidl
index 1da254c..24632aa 100644
--- a/gnss/aidl/android/hardware/gnss/IGnss.aidl
+++ b/gnss/aidl/android/hardware/gnss/IGnss.aidl
@@ -16,7 +16,9 @@
package android.hardware.gnss;
+import android.hardware.gnss.IGnssCallback;
import android.hardware.gnss.IGnssPsds;
+import android.hardware.gnss.IGnssConfiguration;
/**
* Represents the standard GNSS (Global Navigation Satellite System) interface.
@@ -25,9 +27,52 @@
interface IGnss {
/**
+ * All GNSS Binder calls may return a ServiceSpecificException with the following error
+ * codes.
+ */
+ const int ERROR_INVALID_ARGUMENT = 1;
+
+ /**
+ * Opens the interface and provides the callback routines to the implementation of this
+ * interface.
+ *
+ * The framework calls this method to instruct the GPS engine to prepare for serving requests
+ * from the framework. The GNSS HAL implementation must respond to all GNSS requests from the
+ * framework upon successful return from this method until cleanup() method is called to
+ * close this interface.
+ *
+ * @param callback Callback interface for IGnss.
+ */
+ void setCallback(in IGnssCallback callback);
+
+ /**
+ * Closes the interface.
+ *
+ * The close() method is called by the framework to tell the GNSS HAL implementation to
+ * clear the callback and not expect any GNSS requests in the immediate future - e.g. this may
+ * be called when location is disabled by a user setting or low battery conditions. The GNSS HAL
+ * implementation must immediately stop responding to any existing requests until the
+ * setCallback() method is called again and the requests are re-initiated by the framework.
+ *
+ * After this method is called, the GNSS HAL implementation may choose to modify GNSS hardware
+ * states to save power. It is expected that when setCallback() method is called again to
+ * reopen this interface, to serve requests, there may be some minor delays in GNSS response
+ * requests as hardware readiness states are restored, not to exceed those that occur on normal
+ * device boot up.
+ */
+ void close();
+
+ /**
* This method returns the IGnssPsds interface.
*
* @return Handle to the IGnssPsds interface.
*/
IGnssPsds getExtensionPsds();
+
+ /**
+ * This method returns the IGnssConfiguration interface.
+ *
+ * @return Handle to the IGnssConfiguration interface.
+ */
+ IGnssConfiguration getExtensionGnssConfiguration();
}
\ No newline at end of file
diff --git a/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl b/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl
new file mode 100644
index 0000000..a46a018
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss;
+
+import android.hardware.gnss.IGnssPsds;
+import android.hardware.gnss.IGnssConfiguration;
+
+/**
+ * This interface is required for the HAL to communicate certain information
+ * like status and location info back to the framework, the framework implements
+ * the interfaces and passes a handle to the HAL.
+ */
+@VintfStability
+interface IGnssCallback {
+
+ /** Capability bit mask indicating GNSS supports blocklisting satellites */
+ const int CAPABILITY_SATELLITE_BLOCKLIST = 1 << 0;
+
+ /**
+ * Callback to inform framework of the GNSS HAL implementation's capabilities.
+ *
+ * @param capabilities Capability parameter is a bit field of the Capability bit masks.
+ */
+ void gnssSetCapabilitiesCb(in int capabilities);
+}
\ No newline at end of file
diff --git a/gnss/aidl/android/hardware/gnss/IGnssConfiguration.aidl b/gnss/aidl/android/hardware/gnss/IGnssConfiguration.aidl
new file mode 100644
index 0000000..e0ad357
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/IGnssConfiguration.aidl
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss;
+
+import android.hardware.gnss.BlocklistedSource;
+
+/**
+ * Extended interface for GNSS Configuration support.
+ */
+@VintfStability
+interface IGnssConfiguration {
+
+ /** SUPL mode bitmask for Mobile Station Based. */
+ const int SUPL_MODE_MSB = 0x01;
+
+ /** SUPL mode bitmask for Mobile Station Assisted. */
+ const int SUPL_MODE_MSA = 0x02;
+
+ /** LPP profile settings bitmask for enabling LTE Positioning Protocol User Plane. */
+ const int LPP_PROFILE_USER_PLANE = 0x01;
+
+ /** LPP profile settings bitmask for enabling LTE Positioning Protocol Control Plane. */
+ const int LPP_PROFILE_CONTROL_PLANE = 0x02;
+
+ /** A-Glonass positioning protocol bitmask for Radio Resource Control (RRC) Control Plane. */
+ const int GLONASS_POS_PROTOCOL_RRC_CPLANE = 0x01;
+
+ /** A-Glonass positioning protocol bitmask for Radio Resource Location User Plane. */
+ const int GLONASS_POS_PROTOCOL_RRLP_UPLANE = 0x02;
+
+ /** A-Glonass positioning protocol bitmask for LTE Positioning Protocol User Plane. */
+ const int GLONASS_POS_PROTOCOL_LPP_UPLANE = 0x04;
+
+ /**
+ * This method sets the SUPL version requested by Carrier. The GNSS HAL must use this version
+ * of the SUPL protocol if supported.
+ *
+ * @param version SUPL version requested by carrier. This is a bit mask with bits 0:7
+ * representing a service indicator field, bits 8:15 representing the minor version and bits
+ * 16:23 representing the major version.
+ */
+ void setSuplVersion(in int version);
+
+ /**
+ * This method sets the SUPL mode.
+ *
+ * @param mode Bitmask that specifies the SUPL mode which is set with the SUPL_MODE_* constants.
+ */
+ void setSuplMode(in int mode);
+
+ /**
+ * This method sets the LTE Positioning Profile configuration.
+ *
+ * @param lppProfile Bitmask that specifies the LTE Positioning Profile configuration to be set
+ * as per the LPP_PROFILE_* constants. If none of the bits are set, the default setting is
+ * Radio Resource Location Protocol (RRLP).
+ */
+ void setLppProfile(in int lppProfile);
+
+ /**
+ * This method selects positioning protocol on A-Glonass system.
+ *
+ * @param protocol Bitmask that specifies the positioning protocol to be set as per
+ * GLONASS_POS_PROTOCOL_* constants.
+ */
+ void setGlonassPositioningProtocol(in int protocol);
+
+ /**
+ * This method configures which PDN to use.
+ *
+ * @param enable Use emergency PDN if true and regular PDN if false.
+ */
+ void setEmergencySuplPdn(in boolean enable);
+
+ /**
+ * This method sets the emergency session extension duration. The GNSS HAL
+ * implementation must serve emergency SUPL and Control Plane network initiated
+ * location requests for this extra duration after the user initiated emergency
+ * session ends.
+ *
+ * @param emergencyExtensionSeconds Number of seconds to extend the emergency
+ * session duration post emergency call.
+ */
+ void setEsExtensionSec(in int emergencyExtensionSeconds);
+
+ /**
+ * Injects a vector of BlocklistedSource(s) which the HAL must not use to calculate the
+ * GNSS location output.
+ *
+ * The superset of all satellite sources provided, including wildcards, in the latest call
+ * to this method, is the set of satellites sources that must not be used in calculating
+ * location.
+ *
+ * All measurements from the specified satellites, across frequency bands, are blocklisted
+ * together.
+ *
+ * If this method is never called after the IGnssConfiguration.hal connection is made on boot,
+ * or is called with an empty vector, then no satellites are to be blocklisted as a result of
+ * this API.
+ *
+ * This blocklist must be considered as an additional source of which satellites
+ * should not be trusted for location on top of existing sources of similar information
+ * such as satellite broadcast health being unhealthy and measurement outlier removal.
+ *
+ * @param blocklist The BlocklistedSource(s) of satellites the HAL must not use.
+ */
+ void setBlocklist(in BlocklistedSource[] blocklist);
+}
\ No newline at end of file
diff --git a/gnss/aidl/android/hardware/gnss/IGnssPsds.aidl b/gnss/aidl/android/hardware/gnss/IGnssPsds.aidl
index 6f53d6f..7c46096 100644
--- a/gnss/aidl/android/hardware/gnss/IGnssPsds.aidl
+++ b/gnss/aidl/android/hardware/gnss/IGnssPsds.aidl
@@ -32,18 +32,14 @@
* @param psdsType Type of PSDS data.
* @param psdsData GNSS PSDS data. Framework must not parse the data since the data format is
* opaque to framework.
- *
- * @return True if the operation is successful.
*/
- boolean injectPsdsData(in PsdsType psdsType, in byte[] psdsData);
+ void injectPsdsData(in PsdsType psdsType, in byte[] psdsData);
/**
* Opens the PSDS interface and provides the callback routines to the implementation of this
* interface.
*
* @param callback Handle to the IGnssPsdsCallback interface.
- *
- * @return True if the operation is successful.
*/
- boolean setCallback(in IGnssPsdsCallback callback);
+ void setCallback(in IGnssPsdsCallback callback);
}
\ No newline at end of file
diff --git a/gnss/aidl/default/Android.bp b/gnss/aidl/default/Android.bp
index 8c4ee40..1fe43c3 100644
--- a/gnss/aidl/default/Android.bp
+++ b/gnss/aidl/default/Android.bp
@@ -17,8 +17,13 @@
cc_binary {
name: "android.hardware.gnss-service.example",
relative_install_path: "hw",
- init_rc: ["gnss-default.rc"],
- vintf_fragments: ["gnss-default.xml"],
+ init_rc: [
+ "gnss-default.rc",
+ ],
+ vintf_fragments: [
+ "gnss-default.xml",
+ "gnss@2.1-service.xml",
+ ],
vendor: true,
cflags: [
"-Wall",
@@ -27,12 +32,26 @@
shared_libs: [
"libbase",
"libbinder_ndk",
+ "libhidlbase",
+ "libutils",
"liblog",
+ "android.hardware.gnss@2.1",
+ "android.hardware.gnss@2.0",
+ "android.hardware.gnss@1.1",
+ "android.hardware.gnss@1.0",
+ "android.hardware.gnss.measurement_corrections@1.1",
+ "android.hardware.gnss.measurement_corrections@1.0",
+ "android.hardware.gnss.visibility_control@1.0",
"android.hardware.gnss-ndk_platform",
],
srcs: [
"Gnss.cpp",
+ "GnssHidlHal.cpp",
"GnssPsds.cpp",
+ "GnssConfiguration.cpp",
"service.cpp",
],
+ static_libs: [
+ "android.hardware.gnss@common-default-lib",
+ ],
}
diff --git a/gnss/aidl/default/Gnss.cpp b/gnss/aidl/default/Gnss.cpp
index 2a35924..b4d92fd 100644
--- a/gnss/aidl/default/Gnss.cpp
+++ b/gnss/aidl/default/Gnss.cpp
@@ -18,14 +18,51 @@
#include "Gnss.h"
#include <log/log.h>
+#include "GnssConfiguration.h"
#include "GnssPsds.h"
namespace aidl::android::hardware::gnss {
+std::shared_ptr<IGnssCallback> Gnss::sGnssCallback = nullptr;
+
+ndk::ScopedAStatus Gnss::setCallback(const std::shared_ptr<IGnssCallback>& callback) {
+ ALOGD("Gnss::setCallback");
+ if (callback == nullptr) {
+ ALOGE("%s: Null callback ignored", __func__);
+ return ndk::ScopedAStatus::fromExceptionCode(STATUS_INVALID_OPERATION);
+ }
+
+ sGnssCallback = callback;
+
+ int capabilities = (int)IGnssCallback::CAPABILITY_SATELLITE_BLOCKLIST;
+ auto status = sGnssCallback->gnssSetCapabilitiesCb(capabilities);
+ if (!status.isOk()) {
+ ALOGE("%s: Unable to invoke callback.gnssSetCapabilities", __func__);
+ }
+
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Gnss::close() {
+ ALOGD("Gnss::close");
+ sGnssCallback = nullptr;
+ return ndk::ScopedAStatus::ok();
+}
+
ndk::ScopedAStatus Gnss::getExtensionPsds(std::shared_ptr<IGnssPsds>* iGnssPsds) {
ALOGD("Gnss::getExtensionPsds");
*iGnssPsds = SharedRefBase::make<GnssPsds>();
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Gnss::getExtensionGnssConfiguration(
+ std::shared_ptr<IGnssConfiguration>* iGnssConfiguration) {
+ ALOGD("Gnss::getExtensionGnssConfiguration");
+ if (mGnssConfiguration == nullptr) {
+ mGnssConfiguration = SharedRefBase::make<GnssConfiguration>();
+ }
+ *iGnssConfiguration = mGnssConfiguration;
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/Gnss.h b/gnss/aidl/default/Gnss.h
index 9864e9d..61d7cf7 100644
--- a/gnss/aidl/default/Gnss.h
+++ b/gnss/aidl/default/Gnss.h
@@ -17,12 +17,24 @@
#pragma once
#include <aidl/android/hardware/gnss/BnGnss.h>
+#include <aidl/android/hardware/gnss/BnGnssConfiguration.h>
#include <aidl/android/hardware/gnss/BnGnssPsds.h>
+#include "GnssConfiguration.h"
namespace aidl::android::hardware::gnss {
class Gnss : public BnGnss {
+ public:
+ ndk::ScopedAStatus setCallback(const std::shared_ptr<IGnssCallback>& callback) override;
+ ndk::ScopedAStatus close() override;
ndk::ScopedAStatus getExtensionPsds(std::shared_ptr<IGnssPsds>* iGnssPsds) override;
+ ndk::ScopedAStatus getExtensionGnssConfiguration(
+ std::shared_ptr<IGnssConfiguration>* iGnssConfiguration) override;
+
+ std::shared_ptr<GnssConfiguration> mGnssConfiguration;
+
+ private:
+ static std::shared_ptr<IGnssCallback> sGnssCallback;
};
} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssConfiguration.cpp b/gnss/aidl/default/GnssConfiguration.cpp
new file mode 100644
index 0000000..30e0d8c
--- /dev/null
+++ b/gnss/aidl/default/GnssConfiguration.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "GnssConfigurationAidl"
+
+#include "GnssConfiguration.h"
+#include <log/log.h>
+
+namespace aidl::android::hardware::gnss {
+
+ndk::ScopedAStatus GnssConfiguration::setBlocklist(const vector<BlocklistedSource>& sourceList) {
+ ALOGD("GnssConfiguration::setBlocklist");
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ mBlocklistedConstellationSet.clear();
+ mBlocklistedSourceSet.clear();
+ for (const auto& source : sourceList) {
+ if (source.svid == 0) {
+ // Wildcard blocklist, i.e., blocklist entire constellation.
+ mBlocklistedConstellationSet.insert(source.constellation);
+ } else {
+ mBlocklistedSourceSet.insert(source);
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+bool GnssConfiguration::isBlocklistedV2_1(const GnssSvInfoV2_1& gnssSvInfo) const {
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ if (mBlocklistedConstellationSet.find(static_cast<GnssConstellationType>(
+ gnssSvInfo.v2_0.constellation)) != mBlocklistedConstellationSet.end()) {
+ return true;
+ }
+ BlocklistedSource source = {
+ .constellation = static_cast<GnssConstellationType>(gnssSvInfo.v2_0.constellation),
+ .svid = gnssSvInfo.v2_0.v1_0.svid};
+ return (mBlocklistedSourceSet.find(source) != mBlocklistedSourceSet.end());
+}
+
+} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssConfiguration.h b/gnss/aidl/default/GnssConfiguration.h
new file mode 100644
index 0000000..25fa16e
--- /dev/null
+++ b/gnss/aidl/default/GnssConfiguration.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <aidl/android/hardware/gnss/BnGnssConfiguration.h>
+#include <android/hardware/gnss/2.1/IGnssCallback.h>
+#include <mutex>
+#include <unordered_set>
+#include <vector>
+
+namespace aidl::android::hardware::gnss {
+
+using android::hardware::gnss::GnssConstellationType;
+
+struct BlocklistedSourceHash {
+ inline int operator()(const BlocklistedSource& source) const {
+ return int(source.constellation) * 1000 + int(source.svid);
+ }
+};
+
+struct BlocklistedSourceEqual {
+ inline bool operator()(const BlocklistedSource& s1, const BlocklistedSource& s2) const {
+ return (s1.constellation == s2.constellation) && (s1.svid == s2.svid);
+ }
+};
+
+using GnssSvInfoV2_1 = ::android::hardware::gnss::V2_1::IGnssCallback::GnssSvInfo;
+using std::vector;
+using BlocklistedSourceSet =
+ std::unordered_set<BlocklistedSource, BlocklistedSourceHash, BlocklistedSourceEqual>;
+using BlocklistedConstellationSet = std::unordered_set<GnssConstellationType>;
+
+struct GnssConfiguration : public BnGnssConfiguration {
+ public:
+ ndk::ScopedAStatus setSuplVersion(int) override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus setSuplMode(int) override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus setLppProfile(int) override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus setGlonassPositioningProtocol(int) override {
+ return ndk::ScopedAStatus::ok();
+ }
+
+ ndk::ScopedAStatus setEmergencySuplPdn(bool) override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus setEsExtensionSec(int) override { return ndk::ScopedAStatus::ok(); }
+
+ ndk::ScopedAStatus setBlocklist(const vector<BlocklistedSource>& blocklist) override;
+
+ bool isBlocklistedV2_1(const GnssSvInfoV2_1& gnssSvInfo) const;
+
+ private:
+ BlocklistedSourceSet mBlocklistedSourceSet;
+ BlocklistedConstellationSet mBlocklistedConstellationSet;
+ mutable std::recursive_mutex mMutex;
+};
+
+} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssHidlHal.cpp b/gnss/aidl/default/GnssHidlHal.cpp
new file mode 100644
index 0000000..11fc806
--- /dev/null
+++ b/gnss/aidl/default/GnssHidlHal.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "GnssHidlHal"
+
+#include "GnssHidlHal.h"
+//#include <android/hardware/gnss/1.0/IGnssCallback.h>
+
+namespace aidl::android::hardware::gnss {
+
+namespace V1_0 = ::android::hardware::gnss::V1_0;
+
+GnssHidlHal::GnssHidlHal(const std::shared_ptr<Gnss>& gnssAidl) : mGnssAidl(gnssAidl) {
+ Gnss* iGnss = mGnssAidl.get();
+ std::shared_ptr<IGnssConfiguration> iGnssConfiguration;
+ auto status = iGnss->getExtensionGnssConfiguration(&iGnssConfiguration);
+ if (!status.isOk()) {
+ ALOGE("Failed to getExtensionGnssConfiguration.");
+ } else {
+ mGnssConfigurationAidl = iGnss->mGnssConfiguration;
+ }
+};
+
+hidl_vec<GnssSvInfo> GnssHidlHal::filterBlocklistedSatellitesV2_1(
+ hidl_vec<GnssSvInfo> gnssSvInfoList) {
+ ALOGD("filterBlocklistSatellitesV2_1 - overridden by GnssHidlHal class");
+ if (mGnssConfigurationAidl == nullptr) {
+ ALOGE("Handle to AIDL GnssConfiguration is not available.");
+ return gnssSvInfoList;
+ }
+ for (uint32_t i = 0; i < gnssSvInfoList.size(); i++) {
+ if (mGnssConfigurationAidl->isBlocklistedV2_1(gnssSvInfoList[i])) {
+ ALOGD("Blocklisted constellation: %d, svid: %d",
+ (int)gnssSvInfoList[i].v2_0.constellation, gnssSvInfoList[i].v2_0.v1_0.svid);
+ gnssSvInfoList[i].v2_0.v1_0.svFlag &=
+ ~static_cast<uint8_t>(V1_0::IGnssCallback::GnssSvFlags::USED_IN_FIX);
+ }
+ }
+ return gnssSvInfoList;
+}
+
+} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssHidlHal.h b/gnss/aidl/default/GnssHidlHal.h
new file mode 100644
index 0000000..50aad3a
--- /dev/null
+++ b/gnss/aidl/default/GnssHidlHal.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "Gnss.h"
+#include "GnssConfiguration.h"
+#include "v2_1/GnssTemplate.h"
+
+namespace aidl::android::hardware::gnss {
+
+using ::android::hardware::gnss::common::implementation::GnssTemplate;
+using GnssSvInfo = ::android::hardware::gnss::V2_1::IGnssCallback::GnssSvInfo;
+
+class GnssHidlHal : public GnssTemplate<::android::hardware::gnss::V2_1::IGnss> {
+ public:
+ GnssHidlHal(const std::shared_ptr<Gnss>& gnssAidl);
+
+ private:
+ hidl_vec<GnssSvInfo> filterBlocklistedSatellitesV2_1(
+ hidl_vec<GnssSvInfo> gnssSvInfoList) override;
+
+ std::shared_ptr<Gnss> mGnssAidl;
+ std::shared_ptr<GnssConfiguration> mGnssConfigurationAidl;
+};
+
+} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssPsds.cpp b/gnss/aidl/default/GnssPsds.cpp
index c354217..6512af6 100644
--- a/gnss/aidl/default/GnssPsds.cpp
+++ b/gnss/aidl/default/GnssPsds.cpp
@@ -17,27 +17,28 @@
#define LOG_TAG "GnssPsdsAidl"
#include "GnssPsds.h"
-
+#include <aidl/android/hardware/gnss/BnGnss.h>
#include <log/log.h>
namespace aidl::android::hardware::gnss {
std::shared_ptr<IGnssPsdsCallback> GnssPsds::sCallback = nullptr;
-ndk::ScopedAStatus GnssPsds::setCallback(const std::shared_ptr<IGnssPsdsCallback>& callback,
- bool* success) {
+ndk::ScopedAStatus GnssPsds::setCallback(const std::shared_ptr<IGnssPsdsCallback>& callback) {
ALOGD("setCallback");
std::unique_lock<std::mutex> lock(mMutex);
sCallback = callback;
- *success = true;
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus GnssPsds::injectPsdsData(PsdsType psdsType, const std::vector<uint8_t>& psdsData,
- bool* success) {
+ndk::ScopedAStatus GnssPsds::injectPsdsData(PsdsType psdsType,
+ const std::vector<uint8_t>& psdsData) {
ALOGD("injectPsdsData. psdsType: %d, psdsData: %d bytes", static_cast<int>(psdsType),
static_cast<int>(psdsData.size()));
- *success = (psdsData.size() > 0);
- return ndk::ScopedAStatus::ok();
+ if (psdsData.size() > 0) {
+ return ndk::ScopedAStatus::ok();
+ } else {
+ return ndk::ScopedAStatus::fromServiceSpecificError(IGnss::ERROR_INVALID_ARGUMENT);
+ }
}
} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/default/GnssPsds.h b/gnss/aidl/default/GnssPsds.h
index fc65bc1..de9e68f 100644
--- a/gnss/aidl/default/GnssPsds.h
+++ b/gnss/aidl/default/GnssPsds.h
@@ -22,10 +22,9 @@
struct GnssPsds : public BnGnssPsds {
public:
- ndk::ScopedAStatus setCallback(const std::shared_ptr<IGnssPsdsCallback>& callback,
- bool* success) override;
- ndk::ScopedAStatus injectPsdsData(PsdsType psdsType, const std::vector<uint8_t>& psdsData,
- bool* success) override;
+ ndk::ScopedAStatus setCallback(const std::shared_ptr<IGnssPsdsCallback>& callback) override;
+ ndk::ScopedAStatus injectPsdsData(PsdsType psdsType,
+ const std::vector<uint8_t>& psdsData) override;
private:
// Guarded by mMutex
diff --git a/gnss/aidl/default/gnss@2.1-service.xml b/gnss/aidl/default/gnss@2.1-service.xml
new file mode 100644
index 0000000..12a1fdf
--- /dev/null
+++ b/gnss/aidl/default/gnss@2.1-service.xml
@@ -0,0 +1,12 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.gnss</name>
+ <transport>hwbinder</transport>
+ <version>2.1</version>
+ <version>1.1</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/gnss/aidl/default/service.cpp b/gnss/aidl/default/service.cpp
index c79a271..09f1ad2 100644
--- a/gnss/aidl/default/service.cpp
+++ b/gnss/aidl/default/service.cpp
@@ -14,22 +14,45 @@
* limitations under the License.
*/
-#include "Gnss.h"
+#define LOG_TAG "Gnss-main"
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
+#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
+#include <log/log.h>
+#include <pthread.h>
+#include "Gnss.h"
+#include "GnssHidlHal.h"
using aidl::android::hardware::gnss::Gnss;
+using aidl::android::hardware::gnss::GnssHidlHal;
+using ::android::OK;
+using ::android::sp;
+using ::android::hardware::configureRpcThreadpool;
+using ::android::hardware::joinRpcThreadpool;
+using ::android::hardware::gnss::V2_1::IGnss;
int main() {
- ABinderProcess_setThreadPoolMaxThreadCount(0);
- std::shared_ptr<Gnss> vib = ndk::SharedRefBase::make<Gnss>();
+ ABinderProcess_setThreadPoolMaxThreadCount(1);
+ ABinderProcess_startThreadPool();
+ std::shared_ptr<Gnss> gnssAidl = ndk::SharedRefBase::make<Gnss>();
const std::string instance = std::string() + Gnss::descriptor + "/default";
- binder_status_t status = AServiceManager_addService(vib->asBinder().get(), instance.c_str());
+ binder_status_t status =
+ AServiceManager_addService(gnssAidl->asBinder().get(), instance.c_str());
CHECK(status == STATUS_OK);
+ sp<IGnss> gnss = new GnssHidlHal(gnssAidl);
+ configureRpcThreadpool(1, true /* will join */);
+ if (gnss->registerAsService() != OK) {
+ ALOGE("Could not register gnss 2.1 service.");
+ return 0;
+ }
+
+ joinRpcThreadpool();
ABinderProcess_joinThreadPool();
+
return EXIT_FAILURE; // should not reach
}
diff --git a/gnss/aidl/vts/Android.bp b/gnss/aidl/vts/Android.bp
index e57b421..7f3e5ef 100644
--- a/gnss/aidl/vts/Android.bp
+++ b/gnss/aidl/vts/Android.bp
@@ -18,14 +18,22 @@
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
],
- srcs: ["VtsHalGnssTargetTest.cpp"],
+ srcs: [
+ "gnss_hal_test.cpp",
+ "gnss_hal_test_cases.cpp",
+ "GnssCallbackAidl.cpp",
+ "VtsHalGnssTargetTest.cpp",
+ ],
shared_libs: [
+ "android.hardware.gnss@2.1",
"libbinder",
],
static_libs: [
"android.hardware.gnss-cpp",
+ "android.hardware.gnss@common-vts-lib",
],
test_suites: [
+ "general-tests",
"vts",
],
}
diff --git a/gnss/aidl/vts/GnssCallbackAidl.cpp b/gnss/aidl/vts/GnssCallbackAidl.cpp
new file mode 100644
index 0000000..f5c745b
--- /dev/null
+++ b/gnss/aidl/vts/GnssCallbackAidl.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GnssCallbackAidl.h"
+#include <log/log.h>
+
+android::binder::Status GnssCallbackAidl::gnssSetCapabilitiesCb(const int capabilities) {
+ ALOGI("Capabilities received %d", capabilities);
+ capabilities_cbq_.store(capabilities);
+ return android::binder::Status::ok();
+}
diff --git a/gnss/aidl/vts/GnssCallbackAidl.h b/gnss/aidl/vts/GnssCallbackAidl.h
new file mode 100644
index 0000000..7f802ea
--- /dev/null
+++ b/gnss/aidl/vts/GnssCallbackAidl.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <android/hardware/gnss/BnGnssCallback.h>
+#include "GnssCallbackEventQueue.h"
+
+/* Callback class for data & Event. */
+class GnssCallbackAidl : public android::hardware::gnss::BnGnssCallback {
+ public:
+ GnssCallbackAidl() : capabilities_cbq_("capabilities"){};
+ ~GnssCallbackAidl(){};
+
+ android::binder::Status gnssSetCapabilitiesCb(const int capabilities) override;
+
+ int last_capabilities_;
+ android::hardware::gnss::common::GnssCallbackEventQueue<int> capabilities_cbq_;
+};
\ No newline at end of file
diff --git a/gnss/aidl/vts/VtsHalGnssTargetTest.cpp b/gnss/aidl/vts/VtsHalGnssTargetTest.cpp
index e7ffc05..4bba92b 100644
--- a/gnss/aidl/vts/VtsHalGnssTargetTest.cpp
+++ b/gnss/aidl/vts/VtsHalGnssTargetTest.cpp
@@ -13,60 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <aidl/Gtest.h>
-#include <aidl/Vintf.h>
+
+#include "gnss_hal_test.h"
#include <android/hardware/gnss/IGnss.h>
-#include <android/hardware/gnss/IGnssPsds.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
using android::ProcessState;
-using android::sp;
-using android::String16;
-using android::binder::Status;
-using android::hardware::gnss::IGnss;
-using android::hardware::gnss::IGnssPsds;
-using android::hardware::gnss::PsdsType;
-class GnssAidlHalTest : public testing::TestWithParam<std::string> {
- public:
- virtual void SetUp() override {
- gnss_hal_ = android::waitForDeclaredService<IGnss>(String16(GetParam().c_str()));
- ASSERT_NE(gnss_hal_, nullptr);
- }
-
- sp<IGnss> gnss_hal_;
-};
-
-/*
- * SetupTeardownCreateCleanup:
- * Requests the gnss HAL then calls cleanup
- *
- * Empty test fixture to verify basic Setup & Teardown
- */
-TEST_P(GnssAidlHalTest, SetupTeardownCreateCleanup) {}
-
-/*
- * TestPsdsExtension:
- * 1. Gets the PsdsExtension and verifies that it returns a non-null extension.
- * 2. Injects empty PSDS data and verifies that it returns false.
- */
-TEST_P(GnssAidlHalTest, TestPsdsExtension) {
- sp<IGnssPsds> iGnssPsds;
- auto status = gnss_hal_->getExtensionPsds(&iGnssPsds);
- ASSERT_TRUE(status.isOk());
- ASSERT_TRUE(iGnssPsds != nullptr);
-
- bool success;
- status = iGnssPsds->injectPsdsData(PsdsType::LONG_TERM, std::vector<uint8_t>(), &success);
- ASSERT_TRUE(status.isOk());
- ASSERT_FALSE(success);
-}
-
-GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GnssAidlHalTest);
-INSTANTIATE_TEST_SUITE_P(, GnssAidlHalTest,
- testing::ValuesIn(android::getAidlHalInstanceNames(IGnss::descriptor)),
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GnssHalTest);
+INSTANTIATE_TEST_SUITE_P(, GnssHalTest,
+ testing::ValuesIn(android::getAidlHalInstanceNames(IGnssAidl::descriptor)),
android::PrintInstanceNameToString);
int main(int argc, char** argv) {
diff --git a/gnss/aidl/vts/gnss_hal_test.cpp b/gnss/aidl/vts/gnss_hal_test.cpp
new file mode 100644
index 0000000..2447bf8
--- /dev/null
+++ b/gnss/aidl/vts/gnss_hal_test.cpp
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gnss_hal_test.h"
+#include <hidl/ServiceManagement.h>
+
+using GnssConstellationTypeAidl = android::hardware::gnss::GnssConstellationType;
+
+void GnssHalTest::SetUp() {
+ // Get AIDL handle
+ aidl_gnss_hal_ = android::waitForDeclaredService<IGnssAidl>(String16(GetParam().c_str()));
+ ASSERT_NE(aidl_gnss_hal_, nullptr);
+
+ const auto& hidlInstanceNames = android::hardware::getAllHalInstanceNames(
+ android::hardware::gnss::V2_1::IGnss::descriptor);
+ gnss_hal_ = IGnss_V2_1::getService(hidlInstanceNames[0]);
+ ASSERT_NE(gnss_hal_, nullptr);
+
+ SetUpGnssCallback();
+}
+
+void GnssHalTest::SetUpGnssCallback() {
+ aidl_gnss_cb_ = new GnssCallbackAidl();
+ ASSERT_NE(aidl_gnss_cb_, nullptr);
+
+ auto status = aidl_gnss_hal_->setCallback(aidl_gnss_cb_);
+ if (!status.isOk()) {
+ ALOGE("Failed to setCallback");
+ }
+
+ ASSERT_TRUE(status.isOk());
+
+ /*
+ * Capabilities callback should trigger.
+ */
+ EXPECT_TRUE(aidl_gnss_cb_->capabilities_cbq_.retrieve(aidl_gnss_cb_->last_capabilities_,
+ TIMEOUT_SEC));
+
+ EXPECT_EQ(aidl_gnss_cb_->capabilities_cbq_.calledCount(), 1);
+
+ // Invoke the super method.
+ GnssHalTestTemplate<IGnss_V2_1>::SetUpGnssCallback();
+}
diff --git a/gnss/aidl/vts/gnss_hal_test.h b/gnss/aidl/vts/gnss_hal_test.h
new file mode 100644
index 0000000..eb5301e
--- /dev/null
+++ b/gnss/aidl/vts/gnss_hal_test.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+
+#include <android/hardware/gnss/IGnss.h>
+#include <binder/IServiceManager.h>
+
+#include <android/hardware/gnss/2.1/IGnss.h>
+#include "GnssCallbackAidl.h"
+#include "v2_1/gnss_hal_test_template.h"
+
+using IGnss_V2_1 = android::hardware::gnss::V2_1::IGnss;
+
+using android::ProcessState;
+using android::sp;
+using android::String16;
+using IGnssAidl = android::hardware::gnss::IGnss;
+using android::hardware::gnss::BlocklistedSource;
+using android::hardware::gnss::IGnssConfiguration;
+
+// The main test class for GNSS HAL.
+class GnssHalTest : public GnssHalTestTemplate<IGnss_V2_1> {
+ public:
+ GnssHalTest(){};
+ ~GnssHalTest(){};
+ virtual void SetUp() override;
+ virtual void SetUpGnssCallback() override;
+
+ sp<IGnssAidl> aidl_gnss_hal_;
+ sp<GnssCallbackAidl> aidl_gnss_cb_; // Primary callback interface
+};
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
new file mode 100644
index 0000000..2b8a447
--- /dev/null
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -0,0 +1,450 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "GnssHalTestCases"
+
+#include <android/hardware/gnss/IGnssPsds.h>
+#include "gnss_hal_test.h"
+
+using android::sp;
+using android::hardware::gnss::BlocklistedSource;
+using GnssConstellationTypeAidl = android::hardware::gnss::GnssConstellationType;
+using android::hardware::gnss::IGnssConfiguration;
+using android::hardware::gnss::IGnssPsds;
+using android::hardware::gnss::PsdsType;
+
+/*
+ * SetupTeardownCreateCleanup:
+ * Requests the gnss HAL then calls cleanup
+ *
+ * Empty test fixture to verify basic Setup & Teardown
+ */
+TEST_P(GnssHalTest, SetupTeardownCreateCleanup) {}
+
+/*
+ * TestPsdsExtension:
+ * 1. Gets the PsdsExtension and verifies that it returns a non-null extension.
+ * 2. Injects empty PSDS data and verifies that it returns false.
+ */
+TEST_P(GnssHalTest, TestPsdsExtension) {
+ sp<IGnssPsds> iGnssPsds;
+ auto status = aidl_gnss_hal_->getExtensionPsds(&iGnssPsds);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_TRUE(iGnssPsds != nullptr);
+
+ status = iGnssPsds->injectPsdsData(PsdsType::LONG_TERM, std::vector<uint8_t>());
+ ASSERT_TRUE(status.isOk());
+}
+
+/*
+ * FindStrongFrequentNonGpsSource:
+ *
+ * Search through a GnssSvStatus list for the strongest non-GPS satellite observed enough times
+ *
+ * returns the strongest source,
+ * or a source with constellation == UNKNOWN if none are found sufficient times
+ */
+BlocklistedSource FindStrongFrequentNonGpsSource(
+ const std::list<hidl_vec<IGnssCallback_2_1::GnssSvInfo>> sv_info_list,
+ const int min_observations) {
+ struct ComparableBlocklistedSource {
+ BlocklistedSource id;
+
+ ComparableBlocklistedSource() {
+ id.constellation = GnssConstellationTypeAidl::UNKNOWN;
+ id.svid = 0;
+ }
+
+ bool operator<(const ComparableBlocklistedSource& compare) const {
+ return ((id.svid < compare.id.svid) || ((id.svid == compare.id.svid) &&
+ (id.constellation < compare.id.constellation)));
+ }
+ };
+
+ struct SignalCounts {
+ int observations;
+ float max_cn0_dbhz;
+ };
+
+ std::map<ComparableBlocklistedSource, SignalCounts> mapSignals;
+
+ for (const auto& sv_info_vec : sv_info_list) {
+ for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
+ const auto& gnss_sv = sv_info_vec[iSv];
+ if ((gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX) &&
+ (gnss_sv.v2_0.constellation != GnssConstellationType::GPS)) {
+ ComparableBlocklistedSource source;
+ source.id.svid = gnss_sv.v2_0.v1_0.svid;
+ source.id.constellation =
+ static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation);
+
+ const auto& itSignal = mapSignals.find(source);
+ if (itSignal == mapSignals.end()) {
+ SignalCounts counts;
+ counts.observations = 1;
+ counts.max_cn0_dbhz = gnss_sv.v2_0.v1_0.cN0Dbhz;
+ mapSignals.insert(
+ std::pair<ComparableBlocklistedSource, SignalCounts>(source, counts));
+ } else {
+ itSignal->second.observations++;
+ if (itSignal->second.max_cn0_dbhz < gnss_sv.v2_0.v1_0.cN0Dbhz) {
+ itSignal->second.max_cn0_dbhz = gnss_sv.v2_0.v1_0.cN0Dbhz;
+ }
+ }
+ }
+ }
+ }
+
+ float max_cn0_dbhz_with_sufficient_count = 0.;
+ int total_observation_count = 0;
+ int blocklisted_source_count_observation = 0;
+
+ ComparableBlocklistedSource source_to_blocklist; // initializes to zero = UNKNOWN constellation
+ for (auto const& pairSignal : mapSignals) {
+ total_observation_count += pairSignal.second.observations;
+ if ((pairSignal.second.observations >= min_observations) &&
+ (pairSignal.second.max_cn0_dbhz > max_cn0_dbhz_with_sufficient_count)) {
+ source_to_blocklist = pairSignal.first;
+ blocklisted_source_count_observation = pairSignal.second.observations;
+ max_cn0_dbhz_with_sufficient_count = pairSignal.second.max_cn0_dbhz;
+ }
+ }
+ ALOGD("Among %d observations, chose svid %d, constellation %d, "
+ "with %d observations at %.1f max CNo",
+ total_observation_count, source_to_blocklist.id.svid,
+ (int)source_to_blocklist.id.constellation, blocklisted_source_count_observation,
+ max_cn0_dbhz_with_sufficient_count);
+
+ return source_to_blocklist.id;
+}
+
+/*
+ * BlocklistIndividualSatellites:
+ *
+ * 1) Turns on location, waits for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus for common satellites (strongest and one other.)
+ * 2a & b) Turns off location, and blocklists common satellites.
+ * 3) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus does not use those satellites.
+ * 4a & b) Turns off location, and send in empty blocklist.
+ * 5a) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus does re-use at least the previously strongest satellite
+ * 5b) Retry a few times, in case GNSS search strategy takes a while to reacquire even the
+ * formerly strongest satellite
+ */
+TEST_P(GnssHalTest, BlocklistIndividualSatellites) {
+ if (!(aidl_gnss_cb_->last_capabilities_ &
+ (int)GnssCallbackAidl::CAPABILITY_SATELLITE_BLOCKLIST)) {
+ ALOGI("Test BlocklistIndividualSatellites skipped. SATELLITE_BLOCKLIST capability not "
+ "supported.");
+ return;
+ }
+
+ const int kLocationsToAwait = 3;
+ const int kRetriesToUnBlocklist = 10;
+
+ gnss_cb_->location_cbq_.reset();
+ StartAndCheckLocations(kLocationsToAwait);
+ int location_called_count = gnss_cb_->location_cbq_.calledCount();
+
+ // Tolerate 1 less sv status to handle edge cases in reporting.
+ int sv_info_list_cbq_size = gnss_cb_->sv_info_list_cbq_.size();
+ EXPECT_GE(sv_info_list_cbq_size + 1, kLocationsToAwait);
+ ALOGD("Observed %d GnssSvInfo, while awaiting %d Locations (%d received)",
+ sv_info_list_cbq_size, kLocationsToAwait, location_called_count);
+
+ /*
+ * Identify strongest SV seen at least kLocationsToAwait -1 times
+ * Why -1? To avoid test flakiness in case of (plausible) slight flakiness in strongest signal
+ * observability (one epoch RF null)
+ */
+
+ const int kGnssSvInfoListTimeout = 2;
+ std::list<hidl_vec<IGnssCallback_2_1::GnssSvInfo>> sv_info_vec_list;
+ int count = gnss_cb_->sv_info_list_cbq_.retrieve(sv_info_vec_list, sv_info_list_cbq_size,
+ kGnssSvInfoListTimeout);
+
+ ASSERT_EQ(count, sv_info_list_cbq_size);
+
+ BlocklistedSource source_to_blocklist =
+ FindStrongFrequentNonGpsSource(sv_info_vec_list, kLocationsToAwait - 1);
+
+ if (source_to_blocklist.constellation == GnssConstellationTypeAidl::UNKNOWN) {
+ // Cannot find a non-GPS satellite. Let the test pass.
+ ALOGD("Cannot find a non-GPS satellite. Letting the test pass.");
+ return;
+ }
+
+ // Stop locations, blocklist the common SV
+ StopAndClearLocations();
+
+ sp<IGnssConfiguration> gnss_configuration_hal;
+ auto status = aidl_gnss_hal_->getExtensionGnssConfiguration(&gnss_configuration_hal);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_NE(gnss_configuration_hal, nullptr);
+
+ std::vector<BlocklistedSource> sources;
+ sources.resize(1);
+ sources[0] = source_to_blocklist;
+
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+
+ // retry and ensure satellite not used
+ gnss_cb_->sv_info_list_cbq_.reset();
+
+ gnss_cb_->location_cbq_.reset();
+ StartAndCheckLocations(kLocationsToAwait);
+
+ // early exit if test is being run with insufficient signal
+ location_called_count = gnss_cb_->location_cbq_.calledCount();
+ if (location_called_count == 0) {
+ ALOGE("0 Gnss locations received - ensure sufficient signal and retry");
+ }
+ ASSERT_TRUE(location_called_count > 0);
+
+ // Tolerate 1 less sv status to handle edge cases in reporting.
+ sv_info_list_cbq_size = gnss_cb_->sv_info_list_cbq_.size();
+ EXPECT_GE(sv_info_list_cbq_size + 1, kLocationsToAwait);
+ ALOGD("Observed %d GnssSvInfo, while awaiting %d Locations (%d received)",
+ sv_info_list_cbq_size, kLocationsToAwait, location_called_count);
+ for (int i = 0; i < sv_info_list_cbq_size; ++i) {
+ hidl_vec<IGnssCallback_2_1::GnssSvInfo> sv_info_vec;
+ gnss_cb_->sv_info_list_cbq_.retrieve(sv_info_vec, kGnssSvInfoListTimeout);
+ for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
+ const auto& gnss_sv = sv_info_vec[iSv];
+ EXPECT_FALSE((gnss_sv.v2_0.v1_0.svid == source_to_blocklist.svid) &&
+ (static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX));
+ }
+ }
+
+ // clear blocklist and restart - this time updating the blocklist while location is still on
+ sources.resize(0);
+
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+
+ bool strongest_sv_is_reobserved = false;
+ // do several loops awaiting a few locations, allowing non-immediate reacquisition strategies
+ int unblocklist_loops_remaining = kRetriesToUnBlocklist;
+ while (!strongest_sv_is_reobserved && (unblocklist_loops_remaining-- > 0)) {
+ StopAndClearLocations();
+ gnss_cb_->sv_info_list_cbq_.reset();
+
+ gnss_cb_->location_cbq_.reset();
+ StartAndCheckLocations(kLocationsToAwait);
+
+ // early exit loop if test is being run with insufficient signal
+ location_called_count = gnss_cb_->location_cbq_.calledCount();
+ if (location_called_count == 0) {
+ ALOGE("0 Gnss locations received - ensure sufficient signal and retry");
+ }
+ ASSERT_TRUE(location_called_count > 0);
+
+ // Tolerate 1 less sv status to handle edge cases in reporting.
+ sv_info_list_cbq_size = gnss_cb_->sv_info_list_cbq_.size();
+ EXPECT_GE(sv_info_list_cbq_size + 1, kLocationsToAwait);
+ ALOGD("Clear blocklist, observed %d GnssSvInfo, while awaiting %d Locations"
+ ", tries remaining %d",
+ sv_info_list_cbq_size, kLocationsToAwait, unblocklist_loops_remaining);
+
+ for (int i = 0; i < sv_info_list_cbq_size; ++i) {
+ hidl_vec<IGnssCallback_2_1::GnssSvInfo> sv_info_vec;
+ gnss_cb_->sv_info_list_cbq_.retrieve(sv_info_vec, kGnssSvInfoListTimeout);
+ for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
+ const auto& gnss_sv = sv_info_vec[iSv];
+ if ((gnss_sv.v2_0.v1_0.svid == source_to_blocklist.svid) &&
+ (static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX)) {
+ strongest_sv_is_reobserved = true;
+ break;
+ }
+ }
+ if (strongest_sv_is_reobserved) break;
+ }
+ }
+ EXPECT_TRUE(strongest_sv_is_reobserved);
+ StopAndClearLocations();
+}
+
+/*
+ * BlocklistConstellationLocationOff:
+ *
+ * 1) Turns on location, waits for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus for any non-GPS constellations.
+ * 2a & b) Turns off location, and blocklist first non-GPS constellations.
+ * 3) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus does not use any constellation but GPS.
+ * 4a & b) Clean up by turning off location, and send in empty blocklist.
+ */
+TEST_P(GnssHalTest, BlocklistConstellationLocationOff) {
+ if (!(aidl_gnss_cb_->last_capabilities_ &
+ (int)GnssCallbackAidl::CAPABILITY_SATELLITE_BLOCKLIST)) {
+ ALOGI("Test BlocklistConstellationLocationOff skipped. SATELLITE_BLOCKLIST capability not "
+ "supported.");
+ return;
+ }
+
+ const int kLocationsToAwait = 3;
+ const int kGnssSvInfoListTimeout = 2;
+
+ // Find first non-GPS constellation to blocklist
+ GnssConstellationTypeAidl constellation_to_blocklist = static_cast<GnssConstellationTypeAidl>(
+ startLocationAndGetNonGpsConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
+
+ // Turns off location
+ StopAndClearLocations();
+
+ BlocklistedSource source_to_blocklist_1;
+ source_to_blocklist_1.constellation = constellation_to_blocklist;
+ source_to_blocklist_1.svid = 0; // documented wildcard for all satellites in this constellation
+
+ // IRNSS was added in 2.0. Always attempt to blocklist IRNSS to verify that the new enum is
+ // supported.
+ BlocklistedSource source_to_blocklist_2;
+ source_to_blocklist_2.constellation = GnssConstellationTypeAidl::IRNSS;
+ source_to_blocklist_2.svid = 0; // documented wildcard for all satellites in this constellation
+
+ sp<IGnssConfiguration> gnss_configuration_hal;
+ auto status = aidl_gnss_hal_->getExtensionGnssConfiguration(&gnss_configuration_hal);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_NE(gnss_configuration_hal, nullptr);
+
+ hidl_vec<BlocklistedSource> sources;
+ sources.resize(2);
+ sources[0] = source_to_blocklist_1;
+ sources[1] = source_to_blocklist_2;
+
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+
+ // retry and ensure constellation not used
+ gnss_cb_->sv_info_list_cbq_.reset();
+
+ gnss_cb_->location_cbq_.reset();
+ StartAndCheckLocations(kLocationsToAwait);
+
+ // Tolerate 1 less sv status to handle edge cases in reporting.
+ int sv_info_list_cbq_size = gnss_cb_->sv_info_list_cbq_.size();
+ EXPECT_GE(sv_info_list_cbq_size + 1, kLocationsToAwait);
+ ALOGD("Observed %d GnssSvInfo, while awaiting %d Locations", sv_info_list_cbq_size,
+ kLocationsToAwait);
+ for (int i = 0; i < sv_info_list_cbq_size; ++i) {
+ hidl_vec<IGnssCallback_2_1::GnssSvInfo> sv_info_vec;
+ gnss_cb_->sv_info_list_cbq_.retrieve(sv_info_vec, kGnssSvInfoListTimeout);
+ for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
+ const auto& gnss_sv = sv_info_vec[iSv];
+ EXPECT_FALSE((static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist_1.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX));
+ EXPECT_FALSE((static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist_2.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX));
+ }
+ }
+
+ // clean up
+ StopAndClearLocations();
+ sources.resize(0);
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+}
+
+/*
+ * BlocklistConstellationLocationOn:
+ *
+ * 1) Turns on location, waits for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus for any non-GPS constellations.
+ * 2a & b) Blocklist first non-GPS constellation, and turn off location.
+ * 3) Restart location, wait for 3 locations, ensuring they are valid, and checks corresponding
+ * GnssStatus does not use any constellation but GPS.
+ * 4a & b) Clean up by turning off location, and send in empty blocklist.
+ */
+TEST_P(GnssHalTest, BlocklistConstellationLocationOn) {
+ if (!(aidl_gnss_cb_->last_capabilities_ &
+ (int)GnssCallbackAidl::CAPABILITY_SATELLITE_BLOCKLIST)) {
+ ALOGI("Test BlocklistConstellationLocationOn skipped. SATELLITE_BLOCKLIST capability not "
+ "supported.");
+ return;
+ }
+
+ const int kLocationsToAwait = 3;
+ const int kGnssSvInfoListTimeout = 2;
+
+ // Find first non-GPS constellation to blocklist
+ GnssConstellationTypeAidl constellation_to_blocklist = static_cast<GnssConstellationTypeAidl>(
+ startLocationAndGetNonGpsConstellation(kLocationsToAwait, kGnssSvInfoListTimeout));
+
+ BlocklistedSource source_to_blocklist_1;
+ source_to_blocklist_1.constellation = constellation_to_blocklist;
+ source_to_blocklist_1.svid = 0; // documented wildcard for all satellites in this constellation
+
+ // IRNSS was added in 2.0. Always attempt to blocklist IRNSS to verify that the new enum is
+ // supported.
+ BlocklistedSource source_to_blocklist_2;
+ source_to_blocklist_2.constellation = GnssConstellationTypeAidl::IRNSS;
+ source_to_blocklist_2.svid = 0; // documented wildcard for all satellites in this constellation
+
+ sp<IGnssConfiguration> gnss_configuration_hal;
+ auto status = aidl_gnss_hal_->getExtensionGnssConfiguration(&gnss_configuration_hal);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_NE(gnss_configuration_hal, nullptr);
+
+ hidl_vec<BlocklistedSource> sources;
+ sources.resize(2);
+ sources[0] = source_to_blocklist_1;
+ sources[1] = source_to_blocklist_2;
+
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+
+ // Turns off location
+ StopAndClearLocations();
+
+ // retry and ensure constellation not used
+ gnss_cb_->sv_info_list_cbq_.reset();
+
+ gnss_cb_->location_cbq_.reset();
+ StartAndCheckLocations(kLocationsToAwait);
+
+ // Tolerate 1 less sv status to handle edge cases in reporting.
+ int sv_info_list_cbq_size = gnss_cb_->sv_info_list_cbq_.size();
+ EXPECT_GE(sv_info_list_cbq_size + 1, kLocationsToAwait);
+ ALOGD("Observed %d GnssSvInfo, while awaiting %d Locations", sv_info_list_cbq_size,
+ kLocationsToAwait);
+ for (int i = 0; i < sv_info_list_cbq_size; ++i) {
+ hidl_vec<IGnssCallback_2_1::GnssSvInfo> sv_info_vec;
+ gnss_cb_->sv_info_list_cbq_.retrieve(sv_info_vec, kGnssSvInfoListTimeout);
+ for (uint32_t iSv = 0; iSv < sv_info_vec.size(); iSv++) {
+ const auto& gnss_sv = sv_info_vec[iSv];
+ EXPECT_FALSE((static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist_1.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX));
+ EXPECT_FALSE((static_cast<GnssConstellationTypeAidl>(gnss_sv.v2_0.constellation) ==
+ source_to_blocklist_2.constellation) &&
+ (gnss_sv.v2_0.v1_0.svFlag & IGnssCallback_1_0::GnssSvFlags::USED_IN_FIX));
+ }
+ }
+
+ // clean up
+ StopAndClearLocations();
+ sources.resize(0);
+ status = gnss_configuration_hal->setBlocklist(sources);
+ ASSERT_TRUE(status.isOk());
+}
diff --git a/gnss/common/utils/default/include/v2_1/GnssTemplate.h b/gnss/common/utils/default/include/v2_1/GnssTemplate.h
index 1fe6c3e..0128df4 100644
--- a/gnss/common/utils/default/include/v2_1/GnssTemplate.h
+++ b/gnss/common/utils/default/include/v2_1/GnssTemplate.h
@@ -127,12 +127,13 @@
std::atomic<long> mMinIntervalMs;
sp<GnssConfiguration> mGnssConfiguration;
std::atomic<bool> mIsActive;
- std::atomic<bool> mHardwareModeOn;
+ std::atomic<bool> mHardwareModeChecked;
std::atomic<int> mGnssFd;
std::thread mThread;
mutable std::mutex mMutex;
- hidl_vec<GnssSvInfo> filterBlacklistedSatellitesV2_1(hidl_vec<GnssSvInfo> gnssSvInfoList);
+ virtual hidl_vec<GnssSvInfo> filterBlocklistedSatellitesV2_1(
+ hidl_vec<GnssSvInfo> gnssSvInfoList);
};
template <class T_IGnss>
@@ -148,7 +149,7 @@
GnssTemplate<T_IGnss>::GnssTemplate()
: mMinIntervalMs(1000),
mGnssConfiguration{new GnssConfiguration()},
- mHardwareModeOn(false),
+ mHardwareModeChecked(false),
mGnssFd(-1) {}
template <class T_IGnss>
@@ -159,16 +160,18 @@
template <class T_IGnss>
std::unique_ptr<V2_0::GnssLocation> GnssTemplate<T_IGnss>::getLocationFromHW() {
char inputBuffer[INPUT_BUFFER_SIZE];
- if (mGnssFd == -1) {
+ if (!mHardwareModeChecked) {
mGnssFd = open(GNSS_PATH, O_RDWR | O_NONBLOCK);
+ if (mGnssFd == -1) {
+ ALOGW("Failed to open /dev/gnss0 errno: %d", errno);
+ }
+ mHardwareModeChecked = true;
}
if (mGnssFd == -1) {
- ALOGW("Failed to open /dev/gnss0 errno: %d", errno);
return nullptr;
}
- // Indicates it is a hardwareMode, don't report the default location.
- mHardwareModeOn = true;
+
int bytes_write = write(mGnssFd, CMD_GET_LOCATION, strlen(CMD_GET_LOCATION));
if (bytes_write <= 0) {
return nullptr;
@@ -206,14 +209,12 @@
mIsActive = true;
mThread = std::thread([this]() {
while (mIsActive == true) {
- auto svStatus = filterBlacklistedSatellitesV2_1(Utils::getMockSvInfoListV2_1());
+ auto svStatus = filterBlocklistedSatellitesV2_1(Utils::getMockSvInfoListV2_1());
this->reportSvStatus(svStatus);
auto currentLocation = getLocationFromHW();
- if (mHardwareModeOn) {
- if (currentLocation != nullptr) {
- // Only report location if the return from hardware is valid
- this->reportLocation(*currentLocation);
- }
+ if (mGnssFd != -1 && currentLocation != nullptr) {
+ // Only report location if the return from hardware is valid
+ this->reportLocation(*currentLocation);
} else {
if (sGnssCallback_2_1 != nullptr || sGnssCallback_2_0 != nullptr) {
const auto location = Utils::getMockLocationV2_0();
@@ -230,8 +231,9 @@
}
template <class T_IGnss>
-hidl_vec<GnssSvInfo> GnssTemplate<T_IGnss>::filterBlacklistedSatellitesV2_1(
+hidl_vec<GnssSvInfo> GnssTemplate<T_IGnss>::filterBlocklistedSatellitesV2_1(
hidl_vec<GnssSvInfo> gnssSvInfoList) {
+ ALOGD("filterBlocklistedSatellitesV2_1");
for (uint32_t i = 0; i < gnssSvInfoList.size(); i++) {
if (mGnssConfiguration->isBlacklistedV2_1(gnssSvInfoList[i])) {
gnssSvInfoList[i].v2_0.v1_0.svFlag &=
diff --git a/gnss/common/utils/vts/include/v2_1/gnss_hal_test_template.h b/gnss/common/utils/vts/include/v2_1/gnss_hal_test_template.h
index d057c61..1439158 100644
--- a/gnss/common/utils/vts/include/v2_1/gnss_hal_test_template.h
+++ b/gnss/common/utils/vts/include/v2_1/gnss_hal_test_template.h
@@ -119,7 +119,7 @@
* SetUpGnssCallback:
* Set GnssCallback and verify the result.
*/
- void SetUpGnssCallback();
+ virtual void SetUpGnssCallback();
/*
* StartAndCheckFirstLocation:
diff --git a/health/1.0/default/android.hardware.health@1.0-service.rc b/health/1.0/default/android.hardware.health@1.0-service.rc
index 405784f..569dc88 100644
--- a/health/1.0/default/android.hardware.health@1.0-service.rc
+++ b/health/1.0/default/android.hardware.health@1.0-service.rc
@@ -2,4 +2,4 @@
class hal
user system
group system
- capabilities WAKE_ALARM
+ capabilities WAKE_ALARM BLOCK_SUSPEND
diff --git a/health/2.1/default/android.hardware.health@2.1-service.rc b/health/2.1/default/android.hardware.health@2.1-service.rc
index b6d9e3b..8728257 100644
--- a/health/2.1/default/android.hardware.health@2.1-service.rc
+++ b/health/2.1/default/android.hardware.health@2.1-service.rc
@@ -2,5 +2,5 @@
class hal charger
user system
group system
- capabilities WAKE_ALARM
+ capabilities WAKE_ALARM BLOCK_SUSPEND
file /dev/kmsg w
diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal
index c3f15f4..002b183 100644
--- a/radio/1.6/IRadio.hal
+++ b/radio/1.6/IRadio.hal
@@ -16,6 +16,9 @@
package android.hardware.radio@1.6;
+
+import @1.0::CdmaSmsMessage;
+import @1.0::GsmSmsMessage;
import @1.2::DataRequestReason;
import @1.5::IRadio;
import @1.5::AccessNetwork;
@@ -87,4 +90,65 @@
oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
DataProfileInfo dataProfileInfo, bool roamingAllowed,
DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
+
+ /**
+ * Send an SMS message
+ *
+ * @param serial Serial number of request.
+ * @param message GsmSmsMessage as defined in types.hal
+ *
+ * Response function is IRadioResponse.sendSmsResponse_1_6()
+ *
+ * Note this API is the same as the 1.0
+ *
+ * Based on the return error, caller decides to resend if sending sms
+ * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
+ * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
+ */
+ oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
+
+ /**
+ * Send an SMS message. Identical to sendSms_1_6,
+ * except that more messages are expected to be sent soon. If possible,
+ * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
+ *
+ * @param serial Serial number of request.
+ * @param message GsmSmsMessage as defined in types.hal
+ *
+ * Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
+ *
+ * Note this API is the same as the 1.0
+ *
+ * Based on the return error, caller decides to resend if sending sms
+ * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
+ * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
+ */
+ oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
+
+ /**
+ * Send a CDMA SMS message
+ *
+ * @param serial Serial number of request.
+ * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
+ *
+ * Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
+ *
+ * Note this API is the same as the 1.0
+ *
+ */
+ oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
+
+ /**
+ * Send an SMS message. Identical to sendCdmaSms_1_6,
+ * except that more messages are expected to be sent soon.
+ *
+ * @param serial Serial number of request.
+ * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
+ *
+ * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
+ *
+ * Note this API is the same as the 1.5
+ *
+ */
+ oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
};
diff --git a/radio/1.6/IRadioResponse.hal b/radio/1.6/IRadioResponse.hal
index e91b9c1..dfacd66 100644
--- a/radio/1.6/IRadioResponse.hal
+++ b/radio/1.6/IRadioResponse.hal
@@ -16,7 +16,8 @@
package android.hardware.radio@1.6;
-import @1.0::RadioResponseInfo;
+import @1.0::SendSmsResult;
+import @1.6::RadioResponseInfo;
import @1.5::IRadioResponse;
import @1.6::SetupDataCallResult;
@@ -54,4 +55,137 @@
* RadioError:SIM_ABSENT
*/
oneway getDataCallListResponse_1_6(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param sms Response to sms sent as defined by SendSmsResult in types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:SMS_SEND_FAIL_RETRY
+ * RadioError:NETWORK_REJECT
+ * RadioError:INVALID_STATE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:NO_MEMORY
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:SYSTEM_ERR
+ * RadioError:ENCODING_ERR
+ * RadioError:INVALID_SMSC_ADDRESS
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:INTERNAL_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ * RadioError:SIM_ABSENT
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ */
+ oneway sendSmsResponse_1_6(RadioResponseInfo info, SendSmsResult sms);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param sms Response to sms sent as defined by SendSmsResult in types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:SMS_SEND_FAIL_RETRY
+ * RadioError:NETWORK_REJECT
+ * RadioError:INVALID_STATE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:NO_MEMORY
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:SYSTEM_ERR
+ * RadioError:FDN_CHECK_FAILURE
+ * RadioError:ENCODING_ERR
+ * RadioError:INVALID_SMSC_ADDRESS
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:INTERNAL_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ * RadioError:SIM_ABSENT
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ */
+ oneway sendSMSExpectMoreResponse_1_6(RadioResponseInfo info, SendSmsResult sms);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param sms Sms result struct as defined by SendSmsResult in types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:SMS_SEND_FAIL_RETRY
+ * RadioError:NETWORK_REJECT
+ * RadioError:INVALID_STATE
+ * RadioError:NO_MEMORY
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:SYSTEM_ERR
+ * RadioError:FDN_CHECK_FAILURE
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:ENCODING_ERR
+ * RadioError:INVALID_SMSC_ADDRESS
+ * RadioError:INTERNAL_ERR
+ * RadioError:SYSTEM_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:ENCODING_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ */
+ oneway sendCdmaSmsResponse_1_6(RadioResponseInfo info, SendSmsResult sms);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param sms Response to sms sent as defined by SendSmsResult in types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:SMS_SEND_FAIL_RETRY
+ * RadioError:NETWORK_REJECT
+ * RadioError:INVALID_STATE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:NO_MEMORY
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:SYSTEM_ERR
+ * RadioError:FDN_CHECK_FAILURE
+ * RadioError:ENCODING_ERR
+ * RadioError:INVALID_SMSC_ADDRESS
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:INTERNAL_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ */
+ oneway sendCdmaSmsExpectMoreResponse_1_6(RadioResponseInfo info, SendSmsResult sms);
};
diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal
index 4bd3cd6..eee958f 100644
--- a/radio/1.6/types.hal
+++ b/radio/1.6/types.hal
@@ -16,6 +16,8 @@
package android.hardware.radio@1.6;
+import @1.0::RadioError;
+import @1.0::RadioResponseType;
import @1.5::SetupDataCallResult;
import android.hidl.safe_union@1.0::Monostate;
@@ -98,6 +100,29 @@
MAX = 65535
};
+enum RadioError : @1.0::RadioError {
+ /** 1X voice and SMS are not allowed simulteneously. */
+ SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED = 67,
+
+ /** Access is barred. */
+ ACCESS_BARRED = 68,
+
+ /**
+ * SMS is blocked due to call control, e.g., resource unavailable
+ * in the SMR entity.
+ */
+ BLOCKED_DUE_TO_CALL = 69
+};
+
+/**
+ * Overwritten from @1.0::RadioResponseInfo in order to update the RadioError to 1.6 version.
+ */
+struct RadioResponseInfo {
+ RadioResponseType type; // Response type
+ int32_t serial; // Serial number of the request
+ RadioError error; // Response error
+};
+
/**
* Defines range of ports. start and end are the first and last port numbers
* (inclusive) in the range. Both start and end are in QosPortRange.MIN to
diff --git a/radio/1.6/vts/functional/Android.bp b/radio/1.6/vts/functional/Android.bp
index a6cfc6f..5fd30ce 100644
--- a/radio/1.6/vts/functional/Android.bp
+++ b/radio/1.6/vts/functional/Android.bp
@@ -23,6 +23,7 @@
"radio_response.cpp",
"radio_indication.cpp",
"VtsHalRadioV1_6TargetTest.cpp",
+ "vts_test_util_v1_6.cpp",
],
static_libs: [
"RadioVtsTestUtilBase",
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 0bfce4d..300f748 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -65,12 +65,165 @@
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error,
- {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::SIM_ABSENT,
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
} else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
- ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error,
- {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
- RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::NONE,
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
+ }
+}
+
+/*
+ * Test IRadio_1_6.sendSms() for the response returned.
+ */
+TEST_P(RadioHidlTest_v1_6, sendSms_1_6) {
+ LOG(DEBUG) << "sendSms";
+ serial = GetRandomSerialNumber();
+ GsmSmsMessage msg;
+ msg.smscPdu = "";
+ msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
+
+ radio_v1_6->sendSms(serial, msg);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
+
+ if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
+ ::android::hardware::radio::V1_6::RadioError::INVALID_STATE,
+ ::android::hardware::radio::V1_6::RadioError::SIM_ABSENT},
+ CHECK_GENERAL_ERROR));
+ EXPECT_EQ(0, radioRsp_v1_6->sendSmsResult.errorCode);
+ }
+ LOG(DEBUG) << "sendSms finished";
+}
+
+/*
+ * Test IRadio_1_6.sendSMSExpectMore() for the response returned.
+ */
+TEST_P(RadioHidlTest_v1_6, sendSMSExpectMore_1_6) {
+ LOG(DEBUG) << "sendSMSExpectMore";
+ serial = GetRandomSerialNumber();
+ GsmSmsMessage msg;
+ msg.smscPdu = "";
+ msg.pdu = "01000b916105770203f3000006d4f29c3e9b01";
+
+ radio_v1_6->sendSMSExpectMore(serial, msg);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
+
+ if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
+ ::android::hardware::radio::V1_6::RadioError::INVALID_STATE,
+ ::android::hardware::radio::V1_6::RadioError::SIM_ABSENT},
+ CHECK_GENERAL_ERROR));
+ }
+ LOG(DEBUG) << "sendSMSExpectMore finished";
+}
+
+/*
+ * Test IRadio_1_6.sendCdmaSms() for the response returned.
+ */
+TEST_P(RadioHidlTest_v1_6, sendCdmaSms_1_6) {
+ LOG(DEBUG) << "sendCdmaSms";
+ serial = GetRandomSerialNumber();
+
+ // Create a CdmaSmsAddress
+ CdmaSmsAddress cdmaSmsAddress;
+ cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+ cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+ cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+ cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+ cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+ // Create a CdmaSmsSubAddress
+ CdmaSmsSubaddress cdmaSmsSubaddress;
+ cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+ cdmaSmsSubaddress.odd = false;
+ cdmaSmsSubaddress.digits = (std::vector<uint8_t>){};
+
+ // Create a CdmaSmsMessage
+ android::hardware::radio::V1_0::CdmaSmsMessage cdmaSmsMessage;
+ cdmaSmsMessage.teleserviceId = 4098;
+ cdmaSmsMessage.isServicePresent = false;
+ cdmaSmsMessage.serviceCategory = 0;
+ cdmaSmsMessage.address = cdmaSmsAddress;
+ cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+ cdmaSmsMessage.bearerData =
+ (std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+ radio_v1_6->sendCdmaSms(serial, cdmaSmsMessage);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
+
+ if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
+ ::android::hardware::radio::V1_6::RadioError::INVALID_STATE,
+ ::android::hardware::radio::V1_6::RadioError::SIM_ABSENT},
+ CHECK_GENERAL_ERROR));
+ }
+ LOG(DEBUG) << "sendCdmaSms finished";
+}
+
+/*
+ * Test IRadio_1_6.sendCdmaSmsExpectMore() for the response returned.
+ */
+TEST_P(RadioHidlTest_v1_6, sendCdmaSmsExpectMore_1_6) {
+ serial = GetRandomSerialNumber();
+
+ // Create a CdmaSmsAddress
+ CdmaSmsAddress cdmaSmsAddress;
+ cdmaSmsAddress.digitMode = CdmaSmsDigitMode::FOUR_BIT;
+ cdmaSmsAddress.numberMode = CdmaSmsNumberMode::NOT_DATA_NETWORK;
+ cdmaSmsAddress.numberType = CdmaSmsNumberType::UNKNOWN;
+ cdmaSmsAddress.numberPlan = CdmaSmsNumberPlan::UNKNOWN;
+ cdmaSmsAddress.digits = (std::vector<uint8_t>){11, 1, 6, 5, 10, 7, 7, 2, 10, 3, 10, 3};
+
+ // Create a CdmaSmsSubAddress
+ CdmaSmsSubaddress cdmaSmsSubaddress;
+ cdmaSmsSubaddress.subaddressType = CdmaSmsSubaddressType::NSAP;
+ cdmaSmsSubaddress.odd = false;
+ cdmaSmsSubaddress.digits = (std::vector<uint8_t>){};
+
+ // Create a CdmaSmsMessage
+ android::hardware::radio::V1_0::CdmaSmsMessage cdmaSmsMessage;
+ cdmaSmsMessage.teleserviceId = 4098;
+ cdmaSmsMessage.isServicePresent = false;
+ cdmaSmsMessage.serviceCategory = 0;
+ cdmaSmsMessage.address = cdmaSmsAddress;
+ cdmaSmsMessage.subAddress = cdmaSmsSubaddress;
+ cdmaSmsMessage.bearerData =
+ (std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
+
+ radio_v1_6->sendCdmaSmsExpectMore(serial, cdmaSmsMessage);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
+
+ if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS,
+ ::android::hardware::radio::V1_6::RadioError::INVALID_STATE,
+ ::android::hardware::radio::V1_6::RadioError::SIM_ABSENT},
+ CHECK_GENERAL_ERROR));
}
}
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_test.cpp b/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
index 114fd1a..3d0e71c 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_test.cpp
@@ -33,7 +33,7 @@
getDataCallList();
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
- EXPECT_EQ(RadioError::NONE, radioRsp_v1_6->rspInfo.error);
+ EXPECT_EQ(::android::hardware::radio::V1_6::RadioError::NONE, radioRsp_v1_6->rspInfo.error);
sp<::android::hardware::radio::config::V1_1::IRadioConfig> radioConfig =
::android::hardware::radio::config::V1_1::IRadioConfig::getService();
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
index 95a2d09..16fe8c8 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
+++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
@@ -33,7 +33,7 @@
#include <android/hardware/radio/1.6/IRadioResponse.h>
#include <android/hardware/radio/1.6/types.h>
-#include "vts_test_util.h"
+#include "vts_test_util_v1_6.h"
using namespace ::android::hardware::radio::V1_6;
using namespace ::android::hardware::radio::V1_5;
@@ -66,11 +66,14 @@
public:
hidl_vec<RadioBandMode> radioBandModes;
- RadioResponseInfo rspInfo;
+ ::android::hardware::radio::V1_6::RadioResponseInfo rspInfo;
// Call
hidl_vec<::android::hardware::radio::V1_2::Call> currentCalls;
+ // Sms
+ SendSmsResult sendSmsResult;
+
// Modem
bool isModemEnabled;
bool enableModemResponseToggle;
@@ -99,516 +102,665 @@
virtual ~RadioResponse_v1_6() = default;
Return<void> getIccCardStatusResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_0::CardStatus& cardStatus);
- Return<void> supplyIccPinForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> supplyIccPinForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> supplyIccPukForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> supplyIccPukForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> supplyIccPin2ForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> supplyIccPin2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> supplyIccPuk2ForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> supplyIccPuk2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> changeIccPinForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> changeIccPinForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> changeIccPin2ForAppResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> changeIccPin2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
- Return<void> supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info,
- int32_t remainingRetries);
+ Return<void> supplyNetworkDepersonalizationResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t remainingRetries);
Return<void> getCurrentCallsResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::Call>& calls);
- Return<void> dialResponse(const RadioResponseInfo& info);
+ Return<void> dialResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getIMSIForAppResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& imsi);
+ Return<void> getIMSIForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& imsi);
- Return<void> hangupConnectionResponse(const RadioResponseInfo& info);
+ Return<void> hangupConnectionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info);
+ Return<void> hangupWaitingOrBackgroundResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> hangupForegroundResumeBackgroundResponse(const RadioResponseInfo& info);
+ Return<void> hangupForegroundResumeBackgroundResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info);
+ Return<void> switchWaitingOrHoldingAndActiveResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> conferenceResponse(const RadioResponseInfo& info);
+ Return<void> conferenceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> rejectCallResponse(const RadioResponseInfo& info);
+ Return<void> rejectCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getLastCallFailCauseResponse(const RadioResponseInfo& info,
- const LastCallFailCauseInfo& failCauseInfo);
+ Return<void> getLastCallFailCauseResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const LastCallFailCauseInfo& failCauseInfo);
Return<void> getSignalStrengthResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_0::SignalStrength& sigStrength);
Return<void> getVoiceRegistrationStateResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_0::VoiceRegStateResult& voiceRegResponse);
Return<void> getDataRegistrationStateResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_0::DataRegStateResult& dataRegResponse);
- Return<void> getOperatorResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& longName,
- const ::android::hardware::hidl_string& shortName,
- const ::android::hardware::hidl_string& numeric);
+ Return<void> getOperatorResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& longName,
+ const ::android::hardware::hidl_string& shortName,
+ const ::android::hardware::hidl_string& numeric);
- Return<void> setRadioPowerResponse(const RadioResponseInfo& info);
+ Return<void> setRadioPowerResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendDtmfResponse(const RadioResponseInfo& info);
+ Return<void> sendDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
+ Return<void> sendSmsResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const SendSmsResult& sms);
- Return<void> sendSMSExpectMoreResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
+ Return<void> sendSMSExpectMoreResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const SendSmsResult& sms);
Return<void> setupDataCallResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const android::hardware::radio::V1_0::SetupDataCallResult& dcResponse);
- Return<void> iccIOForAppResponse(const RadioResponseInfo& info, const IccIoResult& iccIo);
+ Return<void> iccIOForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const IccIoResult& iccIo);
- Return<void> sendUssdResponse(const RadioResponseInfo& info);
+ Return<void> sendUssdResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> cancelPendingUssdResponse(const RadioResponseInfo& info);
+ Return<void> cancelPendingUssdResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m);
+ Return<void> getClirResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ int32_t n, int32_t m);
- Return<void> setClirResponse(const RadioResponseInfo& info);
+ Return<void> setClirResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getCallForwardStatusResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<CallForwardInfo>& call_forwardInfos);
- Return<void> setCallForwardResponse(const RadioResponseInfo& info);
+ Return<void> setCallForwardResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getCallWaitingResponse(const RadioResponseInfo& info, bool enable,
- int32_t serviceClass);
+ Return<void> getCallWaitingResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enable,
+ int32_t serviceClass);
- Return<void> setCallWaitingResponse(const RadioResponseInfo& info);
+ Return<void> setCallWaitingResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info);
+ Return<void> acknowledgeLastIncomingGsmSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> acceptCallResponse(const RadioResponseInfo& info);
+ Return<void> acceptCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> deactivateDataCallResponse(const RadioResponseInfo& info);
+ Return<void> deactivateDataCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t response);
+ Return<void> getFacilityLockForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t response);
- Return<void> setFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t retry);
+ Return<void> setFacilityLockForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t retry);
- Return<void> setBarringPasswordResponse(const RadioResponseInfo& info);
+ Return<void> setBarringPasswordResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getNetworkSelectionModeResponse(const RadioResponseInfo& info, bool manual);
+ Return<void> getNetworkSelectionModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool manual);
- Return<void> setNetworkSelectionModeAutomaticResponse(const RadioResponseInfo& info);
+ Return<void> setNetworkSelectionModeAutomaticResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setNetworkSelectionModeManualResponse(const RadioResponseInfo& info);
+ Return<void> setNetworkSelectionModeManualResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getAvailableNetworksResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<OperatorInfo>& networkInfos);
- Return<void> startDtmfResponse(const RadioResponseInfo& info);
+ Return<void> startDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> stopDtmfResponse(const RadioResponseInfo& info);
+ Return<void> stopDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getBasebandVersionResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& version);
+ Return<void> getBasebandVersionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& version);
- Return<void> separateConnectionResponse(const RadioResponseInfo& info);
+ Return<void> separateConnectionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setMuteResponse(const RadioResponseInfo& info);
+ Return<void> setMuteResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getMuteResponse(const RadioResponseInfo& info, bool enable);
+ Return<void> getMuteResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ bool enable);
- Return<void> getClipResponse(const RadioResponseInfo& info, ClipStatus status);
+ Return<void> getClipResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ ClipStatus status);
Return<void> getDataCallListResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<
android::hardware::radio::V1_0::SetupDataCallResult>& dcResponse);
- Return<void> sendOemRilRequestRawResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_vec<uint8_t>& data);
+ Return<void> sendOemRilRequestRawResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_vec<uint8_t>& data);
Return<void> sendOemRilRequestStringsResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data);
- Return<void> setSuppServiceNotificationsResponse(const RadioResponseInfo& info);
+ Return<void> setSuppServiceNotificationsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index);
+ Return<void> writeSmsToSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t index);
- Return<void> deleteSmsOnSimResponse(const RadioResponseInfo& info);
+ Return<void> deleteSmsOnSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setBandModeResponse(const RadioResponseInfo& info);
+ Return<void> setBandModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getAvailableBandModesResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<RadioBandMode>& bandModes);
- Return<void> sendEnvelopeResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& commandResponse);
+ Return<void> sendEnvelopeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& commandResponse);
- Return<void> sendTerminalResponseToSimResponse(const RadioResponseInfo& info);
+ Return<void> sendTerminalResponseToSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> handleStkCallSetupRequestFromSimResponse(const RadioResponseInfo& info);
+ Return<void> handleStkCallSetupRequestFromSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> explicitCallTransferResponse(const RadioResponseInfo& info);
+ Return<void> explicitCallTransferResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setPreferredNetworkTypeResponse(const RadioResponseInfo& info);
+ Return<void> setPreferredNetworkTypeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getPreferredNetworkTypeResponse(const RadioResponseInfo& info,
- PreferredNetworkType nwType);
+ Return<void> getPreferredNetworkTypeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ PreferredNetworkType nwType);
Return<void> getNeighboringCidsResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<NeighboringCell>& cells);
- Return<void> setLocationUpdatesResponse(const RadioResponseInfo& info);
+ Return<void> setLocationUpdatesResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info);
+ Return<void> setCdmaSubscriptionSourceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info);
+ Return<void> setCdmaRoamingPreferenceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info,
- CdmaRoamingType type);
+ Return<void> getCdmaRoamingPreferenceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, CdmaRoamingType type);
- Return<void> setTTYModeResponse(const RadioResponseInfo& info);
+ Return<void> setTTYModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getTTYModeResponse(const RadioResponseInfo& info, TtyMode mode);
+ Return<void> getTTYModeResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ TtyMode mode);
- Return<void> setPreferredVoicePrivacyResponse(const RadioResponseInfo& info);
+ Return<void> setPreferredVoicePrivacyResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, bool enable);
+ Return<void> getPreferredVoicePrivacyResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enable);
- Return<void> sendCDMAFeatureCodeResponse(const RadioResponseInfo& info);
+ Return<void> sendCDMAFeatureCodeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendBurstDtmfResponse(const RadioResponseInfo& info);
+ Return<void> sendBurstDtmfResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendCdmaSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
+ Return<void> sendCdmaSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const SendSmsResult& sms);
- Return<void> acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info);
+ Return<void> acknowledgeLastIncomingCdmaSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getGsmBroadcastConfigResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& configs);
- Return<void> setGsmBroadcastConfigResponse(const RadioResponseInfo& info);
+ Return<void> setGsmBroadcastConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setGsmBroadcastActivationResponse(const RadioResponseInfo& info);
+ Return<void> setGsmBroadcastActivationResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getCdmaBroadcastConfigResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& configs);
- Return<void> setCdmaBroadcastConfigResponse(const RadioResponseInfo& info);
+ Return<void> setCdmaBroadcastConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setCdmaBroadcastActivationResponse(const RadioResponseInfo& info);
+ Return<void> setCdmaBroadcastActivationResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getCDMASubscriptionResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& mdn,
- const ::android::hardware::hidl_string& hSid,
- const ::android::hardware::hidl_string& hNid,
- const ::android::hardware::hidl_string& min,
- const ::android::hardware::hidl_string& prl);
+ Return<void> getCDMASubscriptionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& mdn,
+ const ::android::hardware::hidl_string& hSid,
+ const ::android::hardware::hidl_string& hNid,
+ const ::android::hardware::hidl_string& min,
+ const ::android::hardware::hidl_string& prl);
- Return<void> writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index);
+ Return<void> writeSmsToRuimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, uint32_t index);
- Return<void> deleteSmsOnRuimResponse(const RadioResponseInfo& info);
+ Return<void> deleteSmsOnRuimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getDeviceIdentityResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& imei,
- const ::android::hardware::hidl_string& imeisv,
- const ::android::hardware::hidl_string& esn,
- const ::android::hardware::hidl_string& meid);
+ Return<void> getDeviceIdentityResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& imei,
+ const ::android::hardware::hidl_string& imeisv,
+ const ::android::hardware::hidl_string& esn,
+ const ::android::hardware::hidl_string& meid);
- Return<void> exitEmergencyCallbackModeResponse(const RadioResponseInfo& info);
+ Return<void> exitEmergencyCallbackModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getSmscAddressResponse(const RadioResponseInfo& info,
- const ::android::hardware::hidl_string& smsc);
+ Return<void> getSmscAddressResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& smsc);
- Return<void> setSmscAddressResponse(const RadioResponseInfo& info);
+ Return<void> setSmscAddressResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> reportSmsMemoryStatusResponse(const RadioResponseInfo& info);
+ Return<void> reportSmsMemoryStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> reportStkServiceIsRunningResponse(const RadioResponseInfo& info);
+ Return<void> reportStkServiceIsRunningResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info,
- CdmaSubscriptionSource source);
+ Return<void> getCdmaSubscriptionSourceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ CdmaSubscriptionSource source);
Return<void> requestIsimAuthenticationResponse(
- const RadioResponseInfo& info, const ::android::hardware::hidl_string& response);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ::android::hardware::hidl_string& response);
- Return<void> acknowledgeIncomingGsmSmsWithPduResponse(const RadioResponseInfo& info);
+ Return<void> acknowledgeIncomingGsmSmsWithPduResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendEnvelopeWithStatusResponse(const RadioResponseInfo& info,
- const IccIoResult& iccIo);
+ Return<void> sendEnvelopeWithStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const IccIoResult& iccIo);
Return<void> getVoiceRadioTechnologyResponse(
- const RadioResponseInfo& info, ::android::hardware::radio::V1_0::RadioTechnology rat);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ ::android::hardware::radio::V1_0::RadioTechnology rat);
Return<void> getCellInfoListResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::CellInfo>&
cellInfo);
- Return<void> setCellInfoListRateResponse(const RadioResponseInfo& info);
+ Return<void> setCellInfoListRateResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setInitialAttachApnResponse(const RadioResponseInfo& info);
+ Return<void> setInitialAttachApnResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getImsRegistrationStateResponse(const RadioResponseInfo& info, bool isRegistered,
- RadioTechnologyFamily ratFamily);
+ Return<void> getImsRegistrationStateResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool isRegistered,
+ RadioTechnologyFamily ratFamily);
- Return<void> sendImsSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
+ Return<void> sendImsSmsResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const SendSmsResult& sms);
- Return<void> iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info,
- const IccIoResult& result);
+ Return<void> iccTransmitApduBasicChannelResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const IccIoResult& result);
Return<void> iccOpenLogicalChannelResponse(
- const RadioResponseInfo& info, int32_t channelId,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t channelId,
const ::android::hardware::hidl_vec<int8_t>& selectResponse);
- Return<void> iccCloseLogicalChannelResponse(const RadioResponseInfo& info);
+ Return<void> iccCloseLogicalChannelResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info,
- const IccIoResult& result);
+ Return<void> iccTransmitApduLogicalChannelResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const IccIoResult& result);
- Return<void> nvReadItemResponse(const RadioResponseInfo& info,
+ Return<void> nvReadItemResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_string& result);
- Return<void> nvWriteItemResponse(const RadioResponseInfo& info);
+ Return<void> nvWriteItemResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> nvWriteCdmaPrlResponse(const RadioResponseInfo& info);
+ Return<void> nvWriteCdmaPrlResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> nvResetConfigResponse(const RadioResponseInfo& info);
+ Return<void> nvResetConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setUiccSubscriptionResponse(const RadioResponseInfo& info);
+ Return<void> setUiccSubscriptionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setDataAllowedResponse(const RadioResponseInfo& info);
+ Return<void> setDataAllowedResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getHardwareConfigResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<HardwareConfig>& config);
- Return<void> requestIccSimAuthenticationResponse(const RadioResponseInfo& info,
- const IccIoResult& result);
+ Return<void> requestIccSimAuthenticationResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const IccIoResult& result);
- Return<void> setDataProfileResponse(const RadioResponseInfo& info);
+ Return<void> setDataProfileResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> requestShutdownResponse(const RadioResponseInfo& info);
+ Return<void> requestShutdownResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getRadioCapabilityResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const android::hardware::radio::V1_0::RadioCapability& rc);
Return<void> setRadioCapabilityResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const android::hardware::radio::V1_0::RadioCapability& rc);
- Return<void> startLceServiceResponse(const RadioResponseInfo& info,
- const LceStatusInfo& statusInfo);
+ Return<void> startLceServiceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const LceStatusInfo& statusInfo);
- Return<void> stopLceServiceResponse(const RadioResponseInfo& info,
- const LceStatusInfo& statusInfo);
+ Return<void> stopLceServiceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const LceStatusInfo& statusInfo);
- Return<void> pullLceDataResponse(const RadioResponseInfo& info, const LceDataInfo& lceInfo);
+ Return<void> pullLceDataResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const LceDataInfo& lceInfo);
- Return<void> getModemActivityInfoResponse(const RadioResponseInfo& info,
- const ActivityStatsInfo& activityInfo);
+ Return<void> getModemActivityInfoResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const ActivityStatsInfo& activityInfo);
- Return<void> setAllowedCarriersResponse(const RadioResponseInfo& info, int32_t numAllowed);
+ Return<void> setAllowedCarriersResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t numAllowed);
- Return<void> getAllowedCarriersResponse(const RadioResponseInfo& info, bool allAllowed,
- const CarrierRestrictions& carriers);
+ Return<void> getAllowedCarriersResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool allAllowed,
+ const CarrierRestrictions& carriers);
- Return<void> sendDeviceStateResponse(const RadioResponseInfo& info);
+ Return<void> sendDeviceStateResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setIndicationFilterResponse(const RadioResponseInfo& info);
+ Return<void> setIndicationFilterResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setSimCardPowerResponse(const RadioResponseInfo& info);
+ Return<void> setSimCardPowerResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> acknowledgeRequest(int32_t serial);
/* 1.1 Api */
- Return<void> setCarrierInfoForImsiEncryptionResponse(const RadioResponseInfo& info);
+ Return<void> setCarrierInfoForImsiEncryptionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setSimCardPowerResponse_1_1(const RadioResponseInfo& info);
+ Return<void> setSimCardPowerResponse_1_1(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> startNetworkScanResponse(const RadioResponseInfo& info);
+ Return<void> startNetworkScanResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> stopNetworkScanResponse(const RadioResponseInfo& info);
+ Return<void> stopNetworkScanResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> startKeepaliveResponse(const RadioResponseInfo& info,
- const KeepaliveStatus& status);
+ Return<void> startKeepaliveResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const KeepaliveStatus& status);
- Return<void> stopKeepaliveResponse(const RadioResponseInfo& info);
+ Return<void> stopKeepaliveResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
/* 1.2 Api */
- Return<void> setSignalStrengthReportingCriteriaResponse(const RadioResponseInfo& info);
+ Return<void> setSignalStrengthReportingCriteriaResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setLinkCapacityReportingCriteriaResponse(const RadioResponseInfo& info);
+ Return<void> setLinkCapacityReportingCriteriaResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getIccCardStatusResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_2::CardStatus& card_status);
Return<void> getCurrentCallsResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls);
Return<void> getSignalStrengthResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_2::SignalStrength& sig_strength);
Return<void> getSignalStrengthResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_4::SignalStrength& sig_strength);
Return<void> getCellInfoListResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::CellInfo>&
cellInfo);
Return<void> getVoiceRegistrationStateResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_2::VoiceRegStateResult& voiceRegResponse);
Return<void> getDataRegistrationStateResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_2::DataRegStateResult& dataRegResponse);
/* 1.3 Api */
- Return<void> setSystemSelectionChannelsResponse(const RadioResponseInfo& info);
+ Return<void> setSystemSelectionChannelsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> enableModemResponse(const RadioResponseInfo& info);
+ Return<void> enableModemResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getModemStackStatusResponse(const RadioResponseInfo& info, const bool enabled);
+ Return<void> getModemStackStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, const bool enabled);
/* 1.4 Api */
- Return<void> emergencyDialResponse(const RadioResponseInfo& info);
+ Return<void> emergencyDialResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> startNetworkScanResponse_1_4(const RadioResponseInfo& info);
+ Return<void> startNetworkScanResponse_1_4(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getCellInfoListResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_4::CellInfo>&
cellInfo);
Return<void> getDataRegistrationStateResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_4::DataRegStateResult& dataRegResponse);
Return<void> getIccCardStatusResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_4::CardStatus& card_status);
Return<void> getPreferredNetworkTypeBitmapResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_bitfield<
::android::hardware::radio::V1_4::RadioAccessFamily>
networkTypeBitmap);
- Return<void> setPreferredNetworkTypeBitmapResponse(const RadioResponseInfo& info);
+ Return<void> setPreferredNetworkTypeBitmapResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getDataCallListResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<
::android::hardware::radio::V1_4::SetupDataCallResult>& dcResponse);
Return<void> setupDataCallResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const android::hardware::radio::V1_4::SetupDataCallResult& dcResponse);
- Return<void> setAllowedCarriersResponse_1_4(const RadioResponseInfo& info);
+ Return<void> setAllowedCarriersResponse_1_4(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> getAllowedCarriersResponse_1_4(const RadioResponseInfo& info,
- const CarrierRestrictionsWithPriority& carriers,
- SimLockMultiSimPolicy multiSimPolicy);
+ Return<void> getAllowedCarriersResponse_1_4(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const CarrierRestrictionsWithPriority& carriers, SimLockMultiSimPolicy multiSimPolicy);
/* 1.5 Api */
- Return<void> setSignalStrengthReportingCriteriaResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setSignalStrengthReportingCriteriaResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setLinkCapacityReportingCriteriaResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setLinkCapacityReportingCriteriaResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> enableUiccApplicationsResponse(const RadioResponseInfo& info);
+ Return<void> enableUiccApplicationsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> areUiccApplicationsEnabledResponse(const RadioResponseInfo& info, bool enabled);
+ Return<void> areUiccApplicationsEnabledResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enabled);
- Return<void> canToggleUiccApplicationsEnablementResponse(const RadioResponseInfo& info,
- bool canToggle);
+ Return<void> canToggleUiccApplicationsEnablementResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool canToggle);
- Return<void> setSystemSelectionChannelsResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setSystemSelectionChannelsResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> startNetworkScanResponse_1_5(const RadioResponseInfo& info);
+ Return<void> startNetworkScanResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> setupDataCallResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const android::hardware::radio::V1_5::SetupDataCallResult& dcResponse);
Return<void> getDataCallListResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const hidl_vec<::android::hardware::radio::V1_5::SetupDataCallResult>& dcResponse);
- Return<void> setInitialAttachApnResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setInitialAttachApnResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setDataProfileResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setDataProfileResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setRadioPowerResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setRadioPowerResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> setIndicationFilterResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setIndicationFilterResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
Return<void> getBarringInfoResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>&
barringInfos);
Return<void> getVoiceRegistrationStateResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_5::RegStateResult& regResponse);
Return<void> getDataRegistrationStateResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_5::RegStateResult& regResponse);
Return<void> getCellInfoListResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::CellInfo>&
cellInfo);
- Return<void> setNetworkSelectionModeManualResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setNetworkSelectionModeManualResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
- Return<void> sendCdmaSmsExpectMoreResponse(const RadioResponseInfo& info,
- const SendSmsResult& sms);
+ Return<void> sendCdmaSmsExpectMoreResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
+ const SendSmsResult& sms);
Return<void> supplySimDepersonalizationResponse(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
::android::hardware::radio::V1_5::PersoSubstate persoType, int32_t remainingRetries);
Return<void> getIccCardStatusResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
const ::android::hardware::radio::V1_5::CardStatus& card_status);
/* 1.6 Api */
Return<void> setupDataCallResponse_1_6(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const android::hardware::radio::V1_6::SetupDataCallResult& dcResponse);
Return<void> getDataCallListResponse_1_6(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const hidl_vec<::android::hardware::radio::V1_6::SetupDataCallResult>& dcResponse);
+
+ Return<void> sendSmsResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms);
+
+ Return<void> sendSMSExpectMoreResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms);
+
+ Return<void> sendCdmaSmsResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms);
+
+ Return<void> sendCdmaSmsExpectMoreResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms);
};
/* Callback class for radio indication */
diff --git a/radio/1.6/vts/functional/radio_response.cpp b/radio/1.6/vts/functional/radio_response.cpp
index f53e199..a598ac1 100644
--- a/radio/1.6/vts/functional/radio_response.cpp
+++ b/radio/1.6/vts/functional/radio_response.cpp
@@ -22,435 +22,478 @@
/* 1.0 Apis */
Return<void> RadioResponse_v1_6::getIccCardStatusResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_0::CardStatus& /*card_status*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::supplyIccPinForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::supplyIccPinForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::supplyIccPukForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::supplyIccPukForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::supplyIccPin2ForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::supplyIccPin2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::supplyIccPuk2ForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::supplyIccPuk2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::changeIccPinForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::changeIccPinForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::changeIccPin2ForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*remainingRetries*/) {
+Return<void> RadioResponse_v1_6::changeIccPin2ForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
Return<void> RadioResponse_v1_6::supplyNetworkDepersonalizationResponse(
- const RadioResponseInfo& /*info*/, int32_t /*remainingRetries*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*remainingRetries*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCurrentCallsResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::Call>& /*calls*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::dialResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::dialResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getIMSIForAppResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imsi*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*imsi*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::hangupConnectionResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::hangupConnectionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::hangupWaitingOrBackgroundResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::hangupForegroundResumeBackgroundResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::switchWaitingOrHoldingAndActiveResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::conferenceResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::conferenceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::rejectCallResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::rejectCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getLastCallFailCauseResponse(
- const RadioResponseInfo& /*info*/, const LastCallFailCauseInfo& /*failCauseInfo*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const LastCallFailCauseInfo& /*failCauseInfo*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getSignalStrengthResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_0::SignalStrength& /*sig_strength*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getVoiceRegistrationStateResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_0::VoiceRegStateResult& /*voiceRegResponse*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getDataRegistrationStateResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_0::DataRegStateResult& /*dataRegResponse*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getOperatorResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*longName*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*longName*/,
const ::android::hardware::hidl_string& /*shortName*/,
const ::android::hardware::hidl_string& /*numeric*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setRadioPowerResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setRadioPowerResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendDtmfResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::sendDtmfResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendSmsResponse(const RadioResponseInfo& /*info*/,
- const SendSmsResult& /*sms*/) {
+Return<void> RadioResponse_v1_6::sendSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const SendSmsResult& /*sms*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendSMSExpectMoreResponse(const RadioResponseInfo& /*info*/,
- const SendSmsResult& /*sms*/) {
+Return<void> RadioResponse_v1_6::sendSMSExpectMoreResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const SendSmsResult& /*sms*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setupDataCallResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const android::hardware::radio::V1_0::SetupDataCallResult& /*dcResponse*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::iccIOForAppResponse(const RadioResponseInfo& /*info*/,
- const IccIoResult& /*iccIo*/) {
+Return<void> RadioResponse_v1_6::iccIOForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const IccIoResult& /*iccIo*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendUssdResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::sendUssdResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::cancelPendingUssdResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::cancelPendingUssdResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getClirResponse(const RadioResponseInfo& /*info*/, int32_t /*n*/,
- int32_t /*m*/) {
+Return<void> RadioResponse_v1_6::getClirResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, int32_t /*n*/,
+ int32_t /*m*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setClirResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setClirResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCallForwardStatusResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec<CallForwardInfo>&
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_vec<CallForwardInfo>&
/*callForwardInfos*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setCallForwardResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setCallForwardResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getCallWaitingResponse(const RadioResponseInfo& /*info*/,
- bool /*enable*/, int32_t /*serviceClass*/) {
+Return<void> RadioResponse_v1_6::getCallWaitingResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*enable*/,
+ int32_t /*serviceClass*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setCallWaitingResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setCallWaitingResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::acknowledgeLastIncomingGsmSmsResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::acceptCallResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::acceptCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::deactivateDataCallResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::deactivateDataCallResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*response*/) {
+Return<void> RadioResponse_v1_6::getFacilityLockForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, int32_t /*response*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
- int32_t /*retry*/) {
+Return<void> RadioResponse_v1_6::setFacilityLockForAppResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, int32_t /*retry*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setBarringPasswordResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setBarringPasswordResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getNetworkSelectionModeResponse(const RadioResponseInfo& /*info*/,
- bool /*manual*/) {
+Return<void> RadioResponse_v1_6::getNetworkSelectionModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*manual*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setNetworkSelectionModeAutomaticResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setNetworkSelectionModeManualResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getAvailableNetworksResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<OperatorInfo>& /*networkInfos*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startDtmfResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::startDtmfResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::stopDtmfResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::stopDtmfResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getBasebandVersionResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*version*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*version*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::separateConnectionResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::separateConnectionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setMuteResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setMuteResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getMuteResponse(const RadioResponseInfo& /*info*/,
- bool /*enable*/) {
+Return<void> RadioResponse_v1_6::getMuteResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*enable*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getClipResponse(const RadioResponseInfo& /*info*/,
- ClipStatus /*status*/) {
+Return<void> RadioResponse_v1_6::getClipResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ ClipStatus /*status*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getDataCallListResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<android::hardware::radio::V1_0::SetupDataCallResult>&
/*dcResponse*/) {
return Void();
}
Return<void> RadioResponse_v1_6::sendOemRilRequestRawResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
return Void();
}
Return<void> RadioResponse_v1_6::sendOemRilRequestStringsResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& /*data*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setSuppServiceNotificationsResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::writeSmsToSimResponse(const RadioResponseInfo& /*info*/,
- int32_t /*index*/) {
+Return<void> RadioResponse_v1_6::writeSmsToSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, int32_t /*index*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::deleteSmsOnSimResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::deleteSmsOnSimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setBandModeResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setBandModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getAvailableBandModesResponse(
- const RadioResponseInfo& info,
- const ::android::hardware::hidl_vec<RadioBandMode>& bandModes) {
- rspInfo = info;
- radioBandModes = bandModes;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_vec<RadioBandMode>& /*bandModes*/) {
return Void();
}
Return<void> RadioResponse_v1_6::sendEnvelopeResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_string& /*commandResponse*/) {
return Void();
}
Return<void> RadioResponse_v1_6::sendTerminalResponseToSimResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::handleStkCallSetupRequestFromSimResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::explicitCallTransferResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::explicitCallTransferResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setPreferredNetworkTypeResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getPreferredNetworkTypeResponse(const RadioResponseInfo& /*info*/,
- PreferredNetworkType /*nw_type*/) {
+Return<void> RadioResponse_v1_6::getPreferredNetworkTypeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ PreferredNetworkType /*nw_type*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getNeighboringCidsResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<NeighboringCell>& /*cells*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setLocationUpdatesResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setLocationUpdatesResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setCdmaSubscriptionSourceResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setCdmaRoamingPreferenceResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getCdmaRoamingPreferenceResponse(const RadioResponseInfo& /*info*/,
- CdmaRoamingType /*type*/) {
+Return<void> RadioResponse_v1_6::getCdmaRoamingPreferenceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ CdmaRoamingType /*type*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setTTYModeResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setTTYModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getTTYModeResponse(const RadioResponseInfo& /*info*/,
- TtyMode /*mode*/) {
+Return<void> RadioResponse_v1_6::getTTYModeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, TtyMode /*mode*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setPreferredVoicePrivacyResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getPreferredVoicePrivacyResponse(const RadioResponseInfo& /*info*/,
- bool /*enable*/) {
+Return<void> RadioResponse_v1_6::getPreferredVoicePrivacyResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*enable*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendCDMAFeatureCodeResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::sendCDMAFeatureCodeResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendBurstDtmfResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::sendBurstDtmfResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendCdmaSmsResponse(const RadioResponseInfo& /*info*/,
- const SendSmsResult& /*sms*/) {
+Return<void> RadioResponse_v1_6::sendCdmaSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const SendSmsResult& /*sms*/) {
return Void();
}
Return<void> RadioResponse_v1_6::acknowledgeLastIncomingCdmaSmsResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getGsmBroadcastConfigResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setGsmBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setGsmBroadcastConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setGsmBroadcastActivationResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCdmaBroadcastConfigResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setCdmaBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setCdmaBroadcastConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setCdmaBroadcastActivationResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCDMASubscriptionResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*mdn*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*mdn*/,
const ::android::hardware::hidl_string& /*hSid*/,
const ::android::hardware::hidl_string& /*hNid*/,
const ::android::hardware::hidl_string& /*min*/,
@@ -458,17 +501,19 @@
return Void();
}
-Return<void> RadioResponse_v1_6::writeSmsToRuimResponse(const RadioResponseInfo& /*info*/,
- uint32_t /*index*/) {
+Return<void> RadioResponse_v1_6::writeSmsToRuimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, uint32_t /*index*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::deleteSmsOnRuimResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::deleteSmsOnRuimResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getDeviceIdentityResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imei*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*imei*/,
const ::android::hardware::hidl_string& /*imeisv*/,
const ::android::hardware::hidl_string& /*esn*/,
const ::android::hardware::hidl_string& /*meid*/) {
@@ -476,202 +521,225 @@
}
Return<void> RadioResponse_v1_6::exitEmergencyCallbackModeResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getSmscAddressResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*smsc*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*smsc*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setSmscAddressResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setSmscAddressResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::reportSmsMemoryStatusResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::reportSmsMemoryStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::reportStkServiceIsRunningResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCdmaSubscriptionSourceResponse(
- const RadioResponseInfo& /*info*/, CdmaSubscriptionSource /*source*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ CdmaSubscriptionSource /*source*/) {
return Void();
}
Return<void> RadioResponse_v1_6::requestIsimAuthenticationResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*response*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*response*/) {
return Void();
}
Return<void> RadioResponse_v1_6::acknowledgeIncomingGsmSmsWithPduResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendEnvelopeWithStatusResponse(const RadioResponseInfo& /*info*/,
- const IccIoResult& /*iccIo*/) {
+Return<void> RadioResponse_v1_6::sendEnvelopeWithStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const IccIoResult& /*iccIo*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getVoiceRadioTechnologyResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
::android::hardware::radio::V1_0::RadioTechnology /*rat*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCellInfoListResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<
::android::hardware::radio::V1_0::CellInfo>& /*cellInfo*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setCellInfoListRateResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setCellInfoListRateResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setInitialAttachApnResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setInitialAttachApnResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getImsRegistrationStateResponse(
- const RadioResponseInfo& /*info*/, bool /*isRegistered*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*isRegistered*/,
RadioTechnologyFamily /*ratFamily*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendImsSmsResponse(const RadioResponseInfo& /*info*/,
- const SendSmsResult& /*sms*/) {
+Return<void> RadioResponse_v1_6::sendImsSmsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const SendSmsResult& /*sms*/) {
return Void();
}
Return<void> RadioResponse_v1_6::iccTransmitApduBasicChannelResponse(
- const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const IccIoResult& /*result*/) {
return Void();
}
Return<void> RadioResponse_v1_6::iccOpenLogicalChannelResponse(
- const RadioResponseInfo& /*info*/, int32_t /*channelId*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, int32_t /*channelId*/,
const ::android::hardware::hidl_vec<int8_t>& /*selectResponse*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::iccCloseLogicalChannelResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::iccCloseLogicalChannelResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::iccTransmitApduLogicalChannelResponse(
- const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const IccIoResult& /*result*/) {
return Void();
}
Return<void> RadioResponse_v1_6::nvReadItemResponse(
- const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*result*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_string& /*result*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::nvWriteItemResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::nvWriteItemResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::nvWriteCdmaPrlResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::nvWriteCdmaPrlResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::nvResetConfigResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::nvResetConfigResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setUiccSubscriptionResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setUiccSubscriptionResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setDataAllowedResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setDataAllowedResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getHardwareConfigResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<HardwareConfig>& /*config*/) {
return Void();
}
Return<void> RadioResponse_v1_6::requestIccSimAuthenticationResponse(
- const RadioResponseInfo& /*info*/, const IccIoResult& /*result*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const IccIoResult& /*result*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setDataProfileResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setDataProfileResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::requestShutdownResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::requestShutdownResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getRadioCapabilityResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const android::hardware::radio::V1_0::RadioCapability& /*rc*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setRadioCapabilityResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const android::hardware::radio::V1_0::RadioCapability& /*rc*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startLceServiceResponse(const RadioResponseInfo& /*info*/,
- const LceStatusInfo& /*statusInfo*/) {
+Return<void> RadioResponse_v1_6::startLceServiceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const LceStatusInfo& /*statusInfo*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::stopLceServiceResponse(const RadioResponseInfo& /*info*/,
- const LceStatusInfo& /*statusInfo*/) {
+Return<void> RadioResponse_v1_6::stopLceServiceResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const LceStatusInfo& /*statusInfo*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::pullLceDataResponse(const RadioResponseInfo& /*info*/,
- const LceDataInfo& /*lceInfo*/) {
+Return<void> RadioResponse_v1_6::pullLceDataResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const LceDataInfo& /*lceInfo*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getModemActivityInfoResponse(
- const RadioResponseInfo& /*info*/, const ActivityStatsInfo& /*activityInfo*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ActivityStatsInfo& /*activityInfo*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setAllowedCarriersResponse(const RadioResponseInfo& /*info*/,
- int32_t /*numAllowed*/) {
+Return<void> RadioResponse_v1_6::setAllowedCarriersResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ int32_t /*numAllowed*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getAllowedCarriersResponse(
- const RadioResponseInfo& /*info*/, bool /*allAllowed*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*allAllowed*/,
const CarrierRestrictions& /*carriers*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendDeviceStateResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::sendDeviceStateResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setIndicationFilterResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setIndicationFilterResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setSimCardPowerResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setSimCardPowerResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
@@ -681,368 +749,297 @@
/* 1.1 Apis */
Return<void> RadioResponse_v1_6::setCarrierInfoForImsiEncryptionResponse(
- const RadioResponseInfo& /*info*/) {
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setSimCardPowerResponse_1_1(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::setSimCardPowerResponse_1_1(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startNetworkScanResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::startNetworkScanResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::stopNetworkScanResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::stopNetworkScanResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startKeepaliveResponse(const RadioResponseInfo& /*info*/,
- const KeepaliveStatus& /*status*/) {
+Return<void> RadioResponse_v1_6::startKeepaliveResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const KeepaliveStatus& /*status*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::stopKeepaliveResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_6::stopKeepaliveResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
/* 1.2 Apis */
Return<void> RadioResponse_v1_6::setSignalStrengthReportingCriteriaResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setLinkCapacityReportingCriteriaResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getIccCardStatusResponse_1_2(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_2::CardStatus& /*card_status*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCurrentCallsResponse_1_2(
- const RadioResponseInfo& info,
- const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls) {
- rspInfo = info;
- currentCalls = calls;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& /*calls*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getSignalStrengthResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_2::SignalStrength& /*sig_strength*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getSignalStrengthResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_4::SignalStrength& /*sig_strength*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getCellInfoListResponse_1_2(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<
::android::hardware::radio::V1_2::CellInfo>& /*cellInfo*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getVoiceRegistrationStateResponse_1_2(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_2::VoiceRegStateResult& /*voiceRegResponse*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getDataRegistrationStateResponse_1_2(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_2::DataRegStateResult& /*dataRegResponse*/) {
return Void();
}
/* 1.3 Apis */
-Return<void> RadioResponse_v1_6::setSystemSelectionChannelsResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setSystemSelectionChannelsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::enableModemResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::enableModemResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::getModemStackStatusResponse(const RadioResponseInfo& info,
- const bool enabled) {
- rspInfo = info;
- isModemEnabled = enabled;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::getModemStackStatusResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const bool /*enabled*/) {
return Void();
}
/* 1.4 Apis */
-Return<void> RadioResponse_v1_6::emergencyDialResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::emergencyDialResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startNetworkScanResponse_1_4(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::startNetworkScanResponse_1_4(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getDataRegistrationStateResponse_1_4(
- const RadioResponseInfo& info,
- const ::android::hardware::radio::V1_4::DataRegStateResult& dataRegResponse) {
- rspInfo = info;
- dataRegResp = dataRegResponse;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_4::DataRegStateResult& /*dataRegResponse*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getCellInfoListResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<
::android::hardware::radio::V1_4::CellInfo>& /*cellInfo*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getIccCardStatusResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_4::CardStatus& /*card_status*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getPreferredNetworkTypeBitmapResponse(
- const RadioResponseInfo& info, const ::android::hardware::hidl_bitfield<
- ::android::hardware::radio::V1_4::RadioAccessFamily>
- networkTypeBitmap) {
- rspInfo = info;
- networkTypeBitmapResponse = networkTypeBitmap;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::hidl_bitfield<
+ ::android::hardware::radio::V1_4::RadioAccessFamily>
+ /*networkTypeBitmap*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setPreferredNetworkTypeBitmapResponse(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getDataCallListResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_4::SetupDataCallResult>&
/*dcResponse*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::setupDataCallResponse_1_4(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const android::hardware::radio::V1_4::SetupDataCallResult& /*dcResponse*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
-Return<void> RadioResponse_v1_6::setAllowedCarriersResponse_1_4(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setAllowedCarriersResponse_1_4(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getAllowedCarriersResponse_1_4(
- const RadioResponseInfo& info, const CarrierRestrictionsWithPriority& carriers,
- SimLockMultiSimPolicy multiSimPolicy) {
- rspInfo = info;
- carrierRestrictionsResp = carriers;
- multiSimPolicyResp = multiSimPolicy;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const CarrierRestrictionsWithPriority& /*carriers*/,
+ SimLockMultiSimPolicy /*multiSimPolicy*/) {
return Void();
}
/* 1.5 Apis */
Return<void> RadioResponse_v1_6::setSignalStrengthReportingCriteriaResponse_1_5(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setLinkCapacityReportingCriteriaResponse_1_5(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::enableUiccApplicationsResponse(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::enableUiccApplicationsResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::areUiccApplicationsEnabledResponse(const RadioResponseInfo& info,
- bool enabled) {
- rspInfo = info;
- areUiccApplicationsEnabled = enabled;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::areUiccApplicationsEnabledResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*enabled*/) {
return Void();
}
Return<void> RadioResponse_v1_6::canToggleUiccApplicationsEnablementResponse(
- const RadioResponseInfo& info, bool canToggle) {
- rspInfo = info;
- canToggleUiccApplicationsEnablement = canToggle;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/, bool /*canToggle*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setSystemSelectionChannelsResponse_1_5(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::startNetworkScanResponse_1_5(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::startNetworkScanResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setupDataCallResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const android::hardware::radio::V1_5::SetupDataCallResult& /* dcResponse */) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getDataCallListResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const hidl_vec<::android::hardware::radio::V1_5::SetupDataCallResult>& /* dcResponse */) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
-Return<void> RadioResponse_v1_6::setInitialAttachApnResponse_1_5(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setInitialAttachApnResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setDataProfileResponse_1_5(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setDataProfileResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setRadioPowerResponse_1_5(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setRadioPowerResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::setIndicationFilterResponse_1_5(const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::setIndicationFilterResponse_1_5(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getBarringInfoResponse(
- const RadioResponseInfo& info,
- const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_5::CellIdentity& /*cellIdentity*/,
const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>&
- barringInfos) {
- this->barringCellIdentity = cellIdentity;
- this->barringInfos = barringInfos;
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ /*barringInfos*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getVoiceRegistrationStateResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_5::RegStateResult& /*regResponse*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getDataRegistrationStateResponse_1_5(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::radio::V1_5::RegStateResult& /*regResponse*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_6::getCellInfoListResponse_1_5(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
const ::android::hardware::hidl_vec<
::android::hardware::radio::V1_5::CellInfo>& /*cellInfo*/) {
return Void();
}
Return<void> RadioResponse_v1_6::setNetworkSelectionModeManualResponse_1_5(
- const RadioResponseInfo& info) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/) {
return Void();
}
-Return<void> RadioResponse_v1_6::sendCdmaSmsExpectMoreResponse(const RadioResponseInfo& info,
- const SendSmsResult& /*sms*/) {
- rspInfo = info;
- parent_v1_6.notify(info.serial);
+Return<void> RadioResponse_v1_6::sendCdmaSmsExpectMoreResponse(
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const SendSmsResult& /*sms*/) {
return Void();
}
Return<void> RadioResponse_v1_6::supplySimDepersonalizationResponse(
- const RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
::android::hardware::radio::V1_5::PersoSubstate /*persoType*/,
int32_t /*remainingRetries*/) {
return Void();
}
Return<void> RadioResponse_v1_6::getIccCardStatusResponse_1_5(
- const RadioResponseInfo& info,
- const ::android::hardware::radio::V1_5::CardStatus& card_status) {
- rspInfo = info;
- cardStatus = card_status;
- parent_v1_6.notify(info.serial);
+ const ::android::hardware::radio::V1_0::RadioResponseInfo& /*info*/,
+ const ::android::hardware::radio::V1_5::CardStatus& /*card_status*/) {
return Void();
}
/* 1.6 Apis */
Return<void> RadioResponse_v1_6::setupDataCallResponse_1_6(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const android::hardware::radio::V1_6::SetupDataCallResult& /* dcResponse */) {
rspInfo = info;
parent_v1_6.notify(info.serial);
@@ -1050,9 +1047,45 @@
}
Return<void> RadioResponse_v1_6::getDataCallListResponse_1_6(
- const RadioResponseInfo& info,
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const hidl_vec<::android::hardware::radio::V1_6::SetupDataCallResult>& /* dcResponse */) {
rspInfo = info;
parent_v1_6.notify(info.serial);
return Void();
}
+
+Return<void> RadioResponse_v1_6::sendSmsResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms) {
+ rspInfo = info;
+ sendSmsResult = sms;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::sendSMSExpectMoreResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms) {
+ rspInfo = info;
+ sendSmsResult = sms;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::sendCdmaSmsResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms) {
+ rspInfo = info;
+ sendSmsResult = sms;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::sendCdmaSmsExpectMoreResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+ const SendSmsResult& sms) {
+ rspInfo = info;
+ sendSmsResult = sms;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
diff --git a/radio/1.6/vts/functional/vts_test_util_v1_6.cpp b/radio/1.6/vts/functional/vts_test_util_v1_6.cpp
new file mode 100644
index 0000000..2653865
--- /dev/null
+++ b/radio/1.6/vts/functional/vts_test_util_v1_6.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "RadioTest"
+
+#include <vts_test_util_v1_6.h>
+#include <iostream>
+#include "VtsCoreUtil.h"
+
+::testing::AssertionResult CheckAnyOfErrors(
+ ::android::hardware::radio::V1_6::RadioError err,
+ std::vector<::android::hardware::radio::V1_6::RadioError> errors, CheckFlag flag) {
+ const static vector<::android::hardware::radio::V1_6::RadioError> generalErrors = {
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::NO_MEMORY,
+ ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
+ ::android::hardware::radio::V1_6::RadioError::SYSTEM_ERR,
+ ::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED,
+ ::android::hardware::radio::V1_6::RadioError::CANCELLED};
+ if (flag == CHECK_GENERAL_ERROR || flag == CHECK_OEM_AND_GENERAL_ERROR) {
+ for (size_t i = 0; i < generalErrors.size(); i++) {
+ if (err == generalErrors[i]) {
+ return testing::AssertionSuccess();
+ }
+ }
+ }
+ if (flag == CHECK_OEM_ERROR || flag == CHECK_OEM_AND_GENERAL_ERROR) {
+ if (err >= ::android::hardware::radio::V1_6::RadioError::OEM_ERROR_1 &&
+ err <= ::android::hardware::radio::V1_6::RadioError::OEM_ERROR_25) {
+ return testing::AssertionSuccess();
+ }
+ }
+ for (size_t i = 0; i < errors.size(); i++) {
+ if (err == errors[i]) {
+ return testing::AssertionSuccess();
+ }
+ }
+ return testing::AssertionFailure() << "RadioError:" + toString(err) + " is returned";
+}
diff --git a/radio/1.6/vts/functional/vts_test_util_v1_6.h b/radio/1.6/vts/functional/vts_test_util_v1_6.h
new file mode 100644
index 0000000..e04d201
--- /dev/null
+++ b/radio/1.6/vts/functional/vts_test_util_v1_6.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <android/hardware/radio/1.6/types.h>
+
+#include "vts_test_util.h"
+
+/*
+ * Check multiple radio error codes which are possibly returned because of the different
+ * vendor/devices implementations. It allows optional checks for general errors or/and oem errors.
+ */
+::testing::AssertionResult CheckAnyOfErrors(
+ ::android::hardware::radio::V1_6::RadioError err,
+ std::vector<::android::hardware::radio::V1_6::RadioError> generalError,
+ CheckFlag flag = CHECK_DEFAULT);
diff --git a/tv/tuner/1.1/IFilter.hal b/tv/tuner/1.1/IFilter.hal
index 2ba9bb7..3ea4209 100644
--- a/tv/tuner/1.1/IFilter.hal
+++ b/tv/tuner/1.1/IFilter.hal
@@ -70,4 +70,15 @@
* memory is not initialized.
*/
getAvSharedHandle() generates (Result result, handle avMemory, uint64_t avMemSize);
+
+ /**
+ * Configure A/V filter’s stream type. This API only applies to A/V filters.
+ *
+ * @param avStreamType the stream type for A/V.
+ * @return return result Result status of the operation.
+ * SUCCESS if successful,
+ * INVALID_STATE if configure can't be applied,
+ * UNKNOWN_ERROR if failed for other reasons.
+ */
+ configureAvStreamType(AvStreamType avStreamType) generates (Result result);
};
diff --git a/tv/tuner/1.1/default/Filter.cpp b/tv/tuner/1.1/default/Filter.cpp
index c69beca..11e323c 100644
--- a/tv/tuner/1.1/default/Filter.cpp
+++ b/tv/tuner/1.1/default/Filter.cpp
@@ -228,6 +228,27 @@
return Void();
}
+Return<Result> Filter::configureAvStreamType(const V1_1::AvStreamType& avStreamType) {
+ ALOGV("%s", __FUNCTION__);
+
+ if (!mIsMediaFilter) {
+ return Result::UNAVAILABLE;
+ }
+
+ switch (avStreamType.getDiscriminator()) {
+ case V1_1::AvStreamType::hidl_discriminator::audio:
+ mAudioStreamType = static_cast<uint32_t>(avStreamType.audio());
+ break;
+ case V1_1::AvStreamType::hidl_discriminator::video:
+ mVideoStreamType = static_cast<uint32_t>(avStreamType.video());
+ break;
+ default:
+ break;
+ }
+
+ return Result::SUCCESS;
+}
+
bool Filter::createFilterMQ() {
ALOGV("%s", __FUNCTION__);
diff --git a/tv/tuner/1.1/default/Filter.h b/tv/tuner/1.1/default/Filter.h
index f677666..f8b9a65 100644
--- a/tv/tuner/1.1/default/Filter.h
+++ b/tv/tuner/1.1/default/Filter.h
@@ -82,6 +82,8 @@
virtual Return<void> getAvSharedHandle(getAvSharedHandle_cb _hidl_cb) override;
+ virtual Return<Result> configureAvStreamType(const V1_1::AvStreamType& avStreamType) override;
+
/**
* To create a FilterMQ and its Event Flag.
*
@@ -225,6 +227,9 @@
hidl_handle mSharedAvMemHandle;
bool mUsingSharedAvMem = true;
uint32_t mSharedAvMemOffset = 0;
+
+ uint32_t mAudioStreamType;
+ uint32_t mVideoStreamType;
};
} // namespace implementation
diff --git a/tv/tuner/1.1/types.hal b/tv/tuner/1.1/types.hal
index 695826a..1ed6403 100644
--- a/tv/tuner/1.1/types.hal
+++ b/tv/tuner/1.1/types.hal
@@ -568,3 +568,130 @@
bool isHighPriority;
};
+
+@export
+enum VideoStreamType : uint32_t {
+ UNDEFINED,
+ /*
+ * ITU-T | ISO/IEC Reserved
+ */
+ RESERVED,
+ /*
+ * ISO/IEC 11172
+ */
+ MPEG1,
+ /*
+ * ITU-T Rec.H.262 and ISO/IEC 13818-2
+ */
+ MPEG2,
+ /*
+ * ISO/IEC 14496-2 (MPEG-4 H.263 based video)
+ */
+ MPEG4P2,
+ /*
+ * ITU-T Rec.H.264 and ISO/IEC 14496-10
+ */
+ AVC,
+ /*
+ * ITU-T Rec. H.265 and ISO/IEC 23008-2
+ */
+ HEVC,
+ /*
+ * Microsoft VC.1
+ */
+ VC1,
+ /*
+ * Google VP8
+ */
+ VP8,
+ /*
+ * Google VP9
+ */
+ VP9,
+ /*
+ * AOMedia Video 1
+ */
+ AV1,
+ /*
+ * Chinese Standard
+ */
+ AVS,
+ /*
+ * New Chinese Standard
+ */
+ AVS2,
+};
+
+@export
+enum AudioStreamType : uint32_t {
+ UNDEFINED,
+ /*
+ * Uncompressed Audio
+ */
+ PCM,
+ /*
+ * MPEG Audio Layer III versions
+ */
+ MP3,
+ /*
+ * ISO/IEC 11172 Audio
+ */
+ MPEG1,
+ /*
+ * ISO/IEC 13818-3
+ */
+ MPEG2,
+ /*
+ * ISO/IEC 23008-3 (MPEG-H Part 3)
+ */
+ MPEGH,
+ /*
+ * ISO/IEC 14496-3
+ */
+ AAC,
+ /*
+ * Dolby Digital
+ */
+ AC3,
+ /*
+ * Dolby Digital Plus
+ */
+ EAC3,
+ /*
+ * Dolby AC-4
+ */
+ AC4,
+ /*
+ * Basic DTS
+ */
+ DTS,
+ /*
+ * High Resolution DTS
+ */
+ DTS_HD,
+ /*
+ * Windows Media Audio
+ */
+ WMA,
+ /*
+ * Opus Interactive Audio Codec
+ */
+ OPUS,
+ /*
+ * VORBIS Interactive Audio Codec
+ */
+ VORBIS,
+ /*
+ * SJ/T 11368-2006
+ */
+ DRA,
+};
+
+/**
+ * Stream type for A/V filter.
+ */
+safe_union AvStreamType {
+ VideoStreamType video;
+
+ AudioStreamType audio;
+};
diff --git a/tv/tuner/1.1/vts/functional/FilterTests.cpp b/tv/tuner/1.1/vts/functional/FilterTests.cpp
index 5a8985d..e661735 100644
--- a/tv/tuner/1.1/vts/functional/FilterTests.cpp
+++ b/tv/tuner/1.1/vts/functional/FilterTests.cpp
@@ -164,6 +164,20 @@
return AssertionResult(status == Result::SUCCESS);
}
+AssertionResult FilterTests::configAvFilterStreamType(AvStreamType type, uint64_t filterId) {
+ Result status;
+ EXPECT_TRUE(mFilters[filterId]) << "Test with getNewlyOpenedFilterId first.";
+ sp<android::hardware::tv::tuner::V1_1::IFilter> filter_v1_1 =
+ android::hardware::tv::tuner::V1_1::IFilter::castFrom(mFilters[filterId]);
+ if (filter_v1_1 != NULL) {
+ status = filter_v1_1->configureAvStreamType(type);
+ } else {
+ ALOGW("[vts] Can't cast IFilter into v1_1.");
+ return failure();
+ }
+ return AssertionResult(status == Result::SUCCESS);
+}
+
AssertionResult FilterTests::configIpFilterCid(uint32_t ipCid, uint64_t filterId) {
Result status;
EXPECT_TRUE(mFilters[filterId]) << "Open Ip filter first.";
diff --git a/tv/tuner/1.1/vts/functional/FilterTests.h b/tv/tuner/1.1/vts/functional/FilterTests.h
index bc6db86..3472e4e 100644
--- a/tv/tuner/1.1/vts/functional/FilterTests.h
+++ b/tv/tuner/1.1/vts/functional/FilterTests.h
@@ -54,6 +54,7 @@
using android::hardware::tv::tuner::V1_0::IDemux;
using android::hardware::tv::tuner::V1_0::IFilter;
using android::hardware::tv::tuner::V1_0::Result;
+using android::hardware::tv::tuner::V1_1::AvStreamType;
using android::hardware::tv::tuner::V1_1::DemuxFilterEventExt;
using android::hardware::tv::tuner::V1_1::IFilterCallback;
using android::hardware::tv::tuner::V1_1::ITuner;
@@ -150,6 +151,7 @@
AssertionResult getSharedAvMemoryHandle(uint64_t filterId);
AssertionResult releaseShareAvHandle(uint64_t filterId);
AssertionResult configFilter(DemuxFilterSettings setting, uint64_t filterId);
+ AssertionResult configAvFilterStreamType(AvStreamType type, uint64_t filterId);
AssertionResult configIpFilterCid(uint32_t ipCid, uint64_t filterId);
AssertionResult getFilterMQDescriptor(uint64_t filterId);
AssertionResult startFilter(uint64_t filterId);
diff --git a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.cpp b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.cpp
index 263b0e9..db2ac1b 100644
--- a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.cpp
+++ b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TargetTest.cpp
@@ -69,6 +69,7 @@
ASSERT_TRUE(mFilterTests.getNewlyOpenedFilterId_64bit(filterId));
ASSERT_TRUE(mFilterTests.getSharedAvMemoryHandle(filterId));
ASSERT_TRUE(mFilterTests.configFilter(filterConf.settings, filterId));
+ ASSERT_TRUE(mFilterTests.configAvFilterStreamType(filterConf.streamType, filterId));
ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId));
ASSERT_TRUE(mFilterTests.startFilter(filterId));
// tune test
diff --git a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TestConfigurations.h b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TestConfigurations.h
index a3bfa1f..cb86ce8 100644
--- a/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TestConfigurations.h
+++ b/tv/tuner/1.1/vts/functional/VtsHalTvTunerV1_1TestConfigurations.h
@@ -46,9 +46,12 @@
using android::hardware::tv::tuner::V1_0::FrontendType;
using android::hardware::tv::tuner::V1_0::PlaybackSettings;
using android::hardware::tv::tuner::V1_0::RecordSettings;
+using android::hardware::tv::tuner::V1_1::AudioStreamType;
+using android::hardware::tv::tuner::V1_1::AvStreamType;
using android::hardware::tv::tuner::V1_1::FrontendSettingsExt1_1;
using android::hardware::tv::tuner::V1_1::FrontendStatusExt1_1;
using android::hardware::tv::tuner::V1_1::FrontendStatusTypeExt1_1;
+using android::hardware::tv::tuner::V1_1::VideoStreamType;
using namespace std;
@@ -91,6 +94,7 @@
uint32_t bufferSize;
DemuxFilterType type;
DemuxFilterSettings settings;
+ AvStreamType streamType;
uint32_t ipCid;
bool operator<(const FilterConfig& /*c*/) const { return false; }
@@ -184,6 +188,7 @@
filterArray[TS_VIDEO1].bufferSize = FMQ_SIZE_16M;
filterArray[TS_VIDEO1].settings.ts().tpid = 256;
filterArray[TS_VIDEO1].settings.ts().filterSettings.av({.isPassthrough = false});
+ filterArray[TS_VIDEO1].streamType.video(VideoStreamType::MPEG1);
// TS AUDIO filter setting
filterArray[TS_AUDIO0].type.mainType = DemuxFilterMainType::TS;
filterArray[TS_AUDIO0].type.subType.tsFilterType(DemuxTsFilterType::AUDIO);
@@ -195,6 +200,7 @@
filterArray[TS_AUDIO1].bufferSize = FMQ_SIZE_16M;
filterArray[TS_AUDIO1].settings.ts().tpid = 257;
filterArray[TS_AUDIO1].settings.ts().filterSettings.av({.isPassthrough = false});
+ filterArray[TS_VIDEO1].streamType.audio(AudioStreamType::MP3);
// TS PES filter setting
filterArray[TS_PES0].type.mainType = DemuxFilterMainType::TS;
filterArray[TS_PES0].type.subType.tsFilterType(DemuxTsFilterType::PES);