Merge "Add Cellular Identifier Disclosure Transparency HAL APIs" into main
diff --git a/audio/common/all-versions/default/service/android.hardware.audio.service.rc b/audio/common/all-versions/default/service/android.hardware.audio.service.rc
index 0de4eea..a1df67a 100644
--- a/audio/common/all-versions/default/service/android.hardware.audio.service.rc
+++ b/audio/common/all-versions/default/service/android.hardware.audio.service.rc
@@ -2,7 +2,7 @@
class hal
user audioserver
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
- group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock context_hub
+ group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock context_hub system
capabilities BLOCK_SUSPEND SYS_NICE
# setting RLIMIT_RTPRIO allows binder RT priority inheritance
rlimit rtprio 10 10
diff --git a/biometrics/face/aidl/Android.bp b/biometrics/face/aidl/Android.bp
index 79df9c6..6c8cd78 100644
--- a/biometrics/face/aidl/Android.bp
+++ b/biometrics/face/aidl/Android.bp
@@ -18,6 +18,9 @@
"android.hardware.common-V2",
"android.hardware.keymaster-V4",
],
+ include_dirs: [
+ "frameworks/native/aidl/gui",
+ ],
stability: "vintf",
backend: {
java: {
@@ -26,6 +29,11 @@
cpp: {
enabled: false,
},
+ ndk: {
+ additional_shared_libraries: [
+ "libnativewindow",
+ ],
+ },
},
versions_with_info: [
{
@@ -54,6 +62,6 @@
},
],
- frozen: true,
+ frozen: 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
index eaa43f3..5312ca1 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/AcquiredInfo.aidl
@@ -34,31 +34,31 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum AcquiredInfo {
- UNKNOWN = 0,
- GOOD = 1,
- INSUFFICIENT = 2,
- TOO_BRIGHT = 3,
- TOO_DARK = 4,
- TOO_CLOSE = 5,
- TOO_FAR = 6,
- FACE_TOO_HIGH = 7,
- FACE_TOO_LOW = 8,
- FACE_TOO_RIGHT = 9,
- FACE_TOO_LEFT = 10,
- POOR_GAZE = 11,
- NOT_DETECTED = 12,
- TOO_MUCH_MOTION = 13,
- RECALIBRATE = 14,
- TOO_DIFFERENT = 15,
- TOO_SIMILAR = 16,
- PAN_TOO_EXTREME = 17,
- TILT_TOO_EXTREME = 18,
- ROLL_TOO_EXTREME = 19,
- FACE_OBSCURED = 20,
- START = 21,
- SENSOR_DIRTY = 22,
- VENDOR = 23,
- FIRST_FRAME_RECEIVED = 24,
- DARK_GLASSES_DETECTED = 25,
- MOUTH_COVERING_DETECTED = 26,
+ UNKNOWN,
+ GOOD,
+ INSUFFICIENT,
+ TOO_BRIGHT,
+ TOO_DARK,
+ TOO_CLOSE,
+ TOO_FAR,
+ FACE_TOO_HIGH,
+ FACE_TOO_LOW,
+ FACE_TOO_RIGHT,
+ FACE_TOO_LEFT,
+ POOR_GAZE,
+ NOT_DETECTED,
+ TOO_MUCH_MOTION,
+ RECALIBRATE,
+ TOO_DIFFERENT,
+ TOO_SIMILAR,
+ PAN_TOO_EXTREME,
+ TILT_TOO_EXTREME,
+ ROLL_TOO_EXTREME,
+ FACE_OBSCURED,
+ START,
+ SENSOR_DIRTY,
+ VENDOR,
+ FIRST_FRAME_RECEIVED,
+ DARK_GLASSES_DETECTED,
+ MOUTH_COVERING_DETECTED,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
index ce5679a..a203dbe 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentStage.aidl
@@ -34,11 +34,11 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum EnrollmentStage {
- UNKNOWN = 0,
- FIRST_FRAME_RECEIVED = 1,
- WAITING_FOR_CENTERING = 2,
- HOLD_STILL_IN_CENTER = 3,
- ENROLLING_MOVEMENT_1 = 4,
- ENROLLING_MOVEMENT_2 = 5,
- ENROLLMENT_FINISHED = 6,
+ UNKNOWN,
+ FIRST_FRAME_RECEIVED,
+ WAITING_FOR_CENTERING,
+ HOLD_STILL_IN_CENTER,
+ ENROLLING_MOVEMENT_1,
+ ENROLLING_MOVEMENT_2,
+ ENROLLMENT_FINISHED,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
index 8e99ad6..da1e8a3 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/EnrollmentType.aidl
@@ -34,6 +34,6 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum EnrollmentType {
- DEFAULT = 0,
- ACCESSIBILITY = 1,
+ DEFAULT,
+ ACCESSIBILITY,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
index 1a21661..28eb420 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Error.aidl
@@ -34,13 +34,13 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum Error {
- UNKNOWN = 0,
- HW_UNAVAILABLE = 1,
- UNABLE_TO_PROCESS = 2,
- TIMEOUT = 3,
- NO_SPACE = 4,
- CANCELED = 5,
- UNABLE_TO_REMOVE = 6,
- VENDOR = 7,
- REENROLL_REQUIRED = 8,
+ UNKNOWN,
+ HW_UNAVAILABLE,
+ UNABLE_TO_PROCESS,
+ TIMEOUT,
+ NO_SPACE,
+ CANCELED,
+ UNABLE_TO_REMOVE,
+ VENDOR,
+ REENROLL_REQUIRED,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceEnrollOptions.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceEnrollOptions.aidl
new file mode 100644
index 0000000..23fa147
--- /dev/null
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceEnrollOptions.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.biometrics.face;
+@VintfStability
+parcelable FaceEnrollOptions {
+ android.hardware.keymaster.HardwareAuthToken hardwareAuthToken;
+ android.hardware.biometrics.face.EnrollmentType enrollmentType;
+ android.hardware.biometrics.face.Feature[] features;
+ /**
+ * @deprecated use {@link surfacePreview} instead {@link NativeHandle} a handle used to render content from the face HAL. Note that only one of [{@link surfacePreview}, {@link nativeHandlePreview}] should be set at one time.
+ */
+ @nullable android.hardware.common.NativeHandle nativeHandlePreview;
+ @nullable android.view.Surface surfacePreview;
+ @nullable android.hardware.biometrics.common.OperationContext context;
+}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
index a215b99..bf1677c 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/FaceSensorType.aidl
@@ -34,7 +34,7 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum FaceSensorType {
- UNKNOWN = 0,
- RGB = 1,
- IR = 2,
+ UNKNOWN,
+ RGB,
+ IR,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl
index 1875b97..924e6af 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/Feature.aidl
@@ -34,7 +34,7 @@
package android.hardware.biometrics.face;
@Backing(type="byte") @VintfStability
enum Feature {
- REQUIRE_ATTENTION = 0,
- REQUIRE_DIVERSE_POSES = 1,
- DEBUG = 2,
+ REQUIRE_ATTENTION,
+ REQUIRE_DIVERSE_POSES,
+ DEBUG,
}
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
index 3665534..4d99f5a 100644
--- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
+++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl
@@ -37,6 +37,9 @@
void generateChallenge();
void revokeChallenge(in long challenge);
android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType);
+ /**
+ * @deprecated use {@link enrollWithOptions} instead.
+ */
android.hardware.biometrics.common.ICancellationSignal enroll(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface);
android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId);
android.hardware.biometrics.common.ICancellationSignal detectInteraction();
@@ -49,7 +52,11 @@
void resetLockout(in android.hardware.keymaster.HardwareAuthToken hat);
void close();
android.hardware.biometrics.common.ICancellationSignal authenticateWithContext(in long operationId, in android.hardware.biometrics.common.OperationContext context);
+ /**
+ * @deprecated use {@link enrollWithOptions} instead.
+ */
android.hardware.biometrics.common.ICancellationSignal enrollWithContext(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface, in android.hardware.biometrics.common.OperationContext context);
android.hardware.biometrics.common.ICancellationSignal detectInteractionWithContext(in android.hardware.biometrics.common.OperationContext context);
void onContextChanged(in android.hardware.biometrics.common.OperationContext context);
+ android.hardware.biometrics.common.ICancellationSignal enrollWithOptions(in android.hardware.biometrics.face.FaceEnrollOptions options);
}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/FaceEnrollOptions.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/FaceEnrollOptions.aidl
new file mode 100644
index 0000000..75e3978
--- /dev/null
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/FaceEnrollOptions.aidl
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2023 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.OperationContext;
+import android.hardware.biometrics.face.EnrollmentStageConfig;
+import android.hardware.biometrics.face.EnrollmentType;
+import android.hardware.biometrics.face.Feature;
+import android.hardware.common.NativeHandle;
+import android.hardware.keymaster.HardwareAuthToken;
+import android.view.Surface;
+
+/**
+ * Enroll options used to pass information to the HAL when requesting an enroll operation.
+ */
+@VintfStability
+parcelable FaceEnrollOptions {
+ /**
+ * See {@link HardwareAuthToken}.
+ */
+ HardwareAuthToken hardwareAuthToken;
+
+ /**
+ * See {@link EnrollmentType}
+ */
+ EnrollmentType enrollmentType;
+
+ /**
+ * See {@link Feature}
+ */
+ Feature[] features;
+
+ /**
+ * @deprecated use {@link surfacePreview} instead
+ *
+ * {@link NativeHandle} a handle used to render content from the face HAL.
+ *
+ * Note that only one of [{@link surfacePreview}, {@link nativeHandlePreview}]
+ * should be set at one time.
+ */
+ @nullable NativeHandle nativeHandlePreview;
+
+ /**
+ * {@link Surface} a surface used to render content from the face HAL.
+ *
+ * Note that only one of [{@link surfacePreview}, {@link nativeHandlePreview}]
+ * should be set at one time.
+ */
+ @nullable Surface surfacePreview;
+
+ /**
+ * See {@link OperationContext}
+ */
+ @nullable OperationContext context;
+}
diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
index 2be76cb..825af0c 100644
--- a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
+++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl
@@ -20,6 +20,7 @@
import android.hardware.biometrics.common.OperationContext;
import android.hardware.biometrics.face.EnrollmentStageConfig;
import android.hardware.biometrics.face.EnrollmentType;
+import android.hardware.biometrics.face.FaceEnrollOptions;
import android.hardware.biometrics.face.Feature;
import android.hardware.common.NativeHandle;
import android.hardware.keymaster.HardwareAuthToken;
@@ -115,44 +116,7 @@
EnrollmentStageConfig[] getEnrollmentConfig(in EnrollmentType enrollmentType);
/**
- * enroll:
- *
- * A request to add a face enrollment.
- *
- * 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.
- *
- * Before capturing face data, the HAL 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 ISession#generateChallenge. If any of the above checks fail,
- * the framework must be notified using ISessionCallback#onError with Error::UNABLE_TO_PROCESS.
- *
- * During enrollment, the HAL 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.
- *
- * When a face is successfully added and before the framework is notified of remaining=0, the
- * HAL must update and associate this (sensorId, userId) pair with a new entropy-encoded random
- * identifier. See ISession#getAuthenticatorId for more information.
- *
- * Callbacks that signify the end of this operation's lifecycle:
- * - ISessionCallback#onError
- * - ISessionCallback#onEnrollmentProgress(enrollmentId, remaining=0)
- *
- * Other applicable callbacks:
- * - ISessionCallback#onAcquired
- *
- * @param hat See above documentation.
- * @param enrollmentType See the EnrollmentType enum.
- * @param features See the Feature enum.
- * @param previewSurface A surface provided by the framework if SensorProps#halControlsPreview
- * is set to true. The HAL must send the preview frames to previewSurface
- * if it's not null.
- * @return ICancellationSignal An object that can be used by the framework to cancel this
- * operation.
+ * @deprecated use {@link enrollWithOptions} instead.
*/
ICancellationSignal enroll(in HardwareAuthToken hat, in EnrollmentType type,
in Feature[] features, in @nullable NativeHandle previewSurface);
@@ -456,7 +420,9 @@
/* See ISession#authenticateWithContext(long) */
ICancellationSignal authenticateWithContext(in long operationId, in OperationContext context);
- /* See ISession#enroll(HardwareAuthToken, EnrollmentType, Feature[], NativeHandle) */
+ /*
+ * @deprecated use {@link enrollWithOptions} instead.
+ */
ICancellationSignal enrollWithContext(in HardwareAuthToken hat, in EnrollmentType type,
in Feature[] features, in @nullable NativeHandle previewSurface,
in OperationContext context);
@@ -469,4 +435,41 @@
* running when the context changes.
*/
void onContextChanged(in OperationContext context);
+
+ /**
+ * enrollWithOptions:
+ *
+ * A request to add a face enrollment.
+ *
+ * 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.
+ *
+ * Before capturing face data, the HAL 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 ISession#generateChallenge. If any of the above checks fail,
+ * the framework must be notified using ISessionCallback#onError with Error::UNABLE_TO_PROCESS.
+ *
+ * During enrollment, the HAL 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.
+ *
+ * When a face is successfully added and before the framework is notified of remaining=0, the
+ * HAL must update and associate this (sensorId, userId) pair with a new entropy-encoded random
+ * identifier. See ISession#getAuthenticatorId for more information.
+ *
+ * Callbacks that signify the end of this operation's lifecycle:
+ * - ISessionCallback#onError
+ * - ISessionCallback#onEnrollmentProgress(enrollmentId, remaining=0)
+ *
+ * Other applicable callbacks:
+ * - ISessionCallback#onAcquired
+ *
+ * @param FaceEnrollOptions See {@link FaceEnrollOptions} for more detail.
+ * @return ICancellationSignal An object that can be used by the framework to cancel this
+ * operation.
+ */
+ ICancellationSignal enrollWithOptions(in FaceEnrollOptions options);
}
diff --git a/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
index b005746..ecd0934 100644
--- a/biometrics/face/aidl/default/Android.bp
+++ b/biometrics/face/aidl/default/Android.bp
@@ -27,6 +27,7 @@
shared_libs: [
"libbinder_ndk",
"liblog",
+ "libnativewindow",
],
srcs: [
"main.cpp",
@@ -34,12 +35,15 @@
"FakeFaceEngine.cpp",
"Session.cpp",
],
+ include_dirs: [
+ "frameworks/native/aidl/gui",
+ ],
stl: "c++_static",
static_libs: [
"android.hardware.biometrics.common-V3-ndk",
"android.hardware.biometrics.common.thread",
"android.hardware.biometrics.common.util",
- "android.hardware.biometrics.face-V3-ndk",
+ "android.hardware.biometrics.face-V4-ndk",
"android.hardware.common-V2-ndk",
"android.hardware.keymaster-V4-ndk",
"libandroid.hardware.biometrics.face.VirtualProps",
@@ -63,10 +67,14 @@
shared_libs: [
"libbase",
"libbinder_ndk",
+ "libnativewindow",
+ ],
+ include_dirs: [
+ "frameworks/native/aidl/gui",
],
static_libs: [
"libandroid.hardware.biometrics.face.VirtualProps",
- "android.hardware.biometrics.face-V3-ndk",
+ "android.hardware.biometrics.face-V4-ndk",
"android.hardware.biometrics.common-V3-ndk",
"android.hardware.keymaster-V4-ndk",
"android.hardware.biometrics.common.util",
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index 6235b83..6f3f2fc 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -175,4 +175,10 @@
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Session::enrollWithOptions(const FaceEnrollOptions& options,
+ std::shared_ptr<common::ICancellationSignal>* out) {
+ return enroll(options.hardwareAuthToken, options.enrollmentType, options.features,
+ options.nativeHandlePreview, out);
+}
+
} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h
index 7ca6a1f..ce6e7f1 100644
--- a/biometrics/face/aidl/default/Session.h
+++ b/biometrics/face/aidl/default/Session.h
@@ -19,6 +19,7 @@
#include <random>
#include <aidl/android/hardware/biometrics/face/BnSession.h>
+#include <aidl/android/hardware/biometrics/face/FaceEnrollOptions.h>
#include <aidl/android/hardware/biometrics/face/ISessionCallback.h>
#include "FakeFaceEngine.h"
@@ -88,6 +89,10 @@
ndk::ScopedAStatus onContextChanged(const common::OperationContext& context) override;
+ ndk::ScopedAStatus enrollWithOptions(
+ const FaceEnrollOptions& options,
+ std::shared_ptr<common::ICancellationSignal>* out) override;
+
private:
std::unique_ptr<FakeFaceEngine> mEngine;
std::shared_ptr<ISessionCallback> mCb;
diff --git a/biometrics/face/aidl/default/apex/manifest.json b/biometrics/face/aidl/default/apex/manifest.json
index ecdc299..e7d177b 100644
--- a/biometrics/face/aidl/default/apex/manifest.json
+++ b/biometrics/face/aidl/default/apex/manifest.json
@@ -1,4 +1,4 @@
{
"name": "com.android.hardware.biometrics.face.virtual",
- "version": 1
+ "version": 2
}
diff --git a/biometrics/face/aidl/default/face-example.xml b/biometrics/face/aidl/default/face-example.xml
index 1c5071a..2b39b3d 100644
--- a/biometrics/face/aidl/default/face-example.xml
+++ b/biometrics/face/aidl/default/face-example.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.biometrics.face</name>
- <version>3</version>
+ <version>4</version>
<fqname>IFace/virtual</fqname>
</hal>
</manifest>
diff --git a/cas/aidl/default/service.cpp b/cas/aidl/default/service.cpp
index bed2f01..076c7bb 100644
--- a/cas/aidl/default/service.cpp
+++ b/cas/aidl/default/service.cpp
@@ -31,6 +31,7 @@
int main() {
ABinderProcess_setThreadPoolMaxThreadCount(8);
+ ABinderProcess_startThreadPool();
// Setup hwbinder service
std::shared_ptr<MediaCasService> service = ::ndk::SharedRefBase::make<MediaCasService>();
diff --git a/compatibility_matrices/compatibility_matrix.9.xml b/compatibility_matrices/compatibility_matrix.9.xml
index 60dbd99..1ea8b62 100644
--- a/compatibility_matrices/compatibility_matrix.9.xml
+++ b/compatibility_matrices/compatibility_matrix.9.xml
@@ -117,7 +117,7 @@
</hal>
<hal format="aidl" optional="true" updatable-via-apex="true">
<name>android.hardware.biometrics.face</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IFace</name>
<instance>default</instance>
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
index 2e902e5..92ed6d3 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
@@ -98,17 +98,21 @@
}
void validateDisplay(int64_t display,
- std::optional<ClockMonotonicTimestamp> expectedPresentTime) {
+ std::optional<ClockMonotonicTimestamp> expectedPresentTime,
+ int32_t frameIntervalNs) {
auto& command = getDisplayCommand(display);
command.expectedPresentTime = expectedPresentTime;
command.validateDisplay = true;
+ command.frameIntervalNs = frameIntervalNs;
}
void presentOrvalidateDisplay(int64_t display,
- std::optional<ClockMonotonicTimestamp> expectedPresentTime) {
+ std::optional<ClockMonotonicTimestamp> expectedPresentTime,
+ int32_t frameIntervalNs) {
auto& command = getDisplayCommand(display);
command.expectedPresentTime = expectedPresentTime;
command.presentOrValidateDisplay = true;
+ command.frameIntervalNs = frameIntervalNs;
}
void acceptDisplayChanges(int64_t display) {
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.h b/graphics/composer/aidl/vts/VtsComposerClient.h
index 20dc733..b45c71f 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.h
+++ b/graphics/composer/aidl/vts/VtsComposerClient.h
@@ -197,6 +197,7 @@
std::vector<RefreshRateChangedDebugData> takeListOfRefreshRateChangedDebugData();
static constexpr int32_t kMaxFrameIntervalNs = 50000000; // 20fps
+ static constexpr int32_t kNoFrameIntervalNs = 0;
private:
void addDisplayConfigs(VtsDisplay*, const std::vector<DisplayConfiguration>&);
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
index 466954f..58eca6e 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
@@ -220,7 +220,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
// if hwc cannot handle and asks for composition change,
// just succeed the test
@@ -279,7 +280,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
@@ -338,7 +340,8 @@
getDisplayHeight(), mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
@@ -465,7 +468,8 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
auto changedCompositionTypes = mReader.takeChangedCompositionTypes(getPrimaryDisplayId());
@@ -498,7 +502,8 @@
mWriter->setClientTarget(getPrimaryDisplayId(), /*slot*/ 0, buffer, clientFence,
clientDataspace, std::vector<common::Rect>(1, damage));
layer->setToClientComposition(*mWriter);
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
changedCompositionTypes = mReader.takeChangedCompositionTypes(getPrimaryDisplayId());
ASSERT_TRUE(changedCompositionTypes.empty());
@@ -575,7 +580,8 @@
clientLayer->setDisplayFrame(clientFrame);
clientLayer->setZOrder(0);
clientLayer->write(*mWriter);
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
auto changedCompositionTypes = mReader.takeChangedCompositionTypes(getPrimaryDisplayId());
@@ -604,7 +610,8 @@
mWriter->setClientTarget(getPrimaryDisplayId(), /*slot*/ 0, buffer, clientFence,
clientDataspace, std::vector<common::Rect>(1, clientFrame));
clientLayer->setToClientComposition(*mWriter);
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
changedCompositionTypes = mReader.takeChangedCompositionTypes(getPrimaryDisplayId());
ASSERT_TRUE(changedCompositionTypes.empty());
@@ -652,7 +659,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -680,7 +688,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
ASSERT_TRUE(mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty());
@@ -721,7 +730,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -785,7 +795,8 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -843,7 +854,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -865,7 +877,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
ASSERT_TRUE(mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty());
ASSERT_TRUE(mReader.takeErrors().empty());
@@ -930,7 +943,8 @@
writeLayers(layers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED()
@@ -1065,7 +1079,8 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1110,7 +1125,8 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1150,7 +1166,8 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1234,7 +1251,8 @@
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1280,7 +1298,8 @@
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1326,7 +1345,8 @@
writeLayers(mLayers);
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED();
@@ -1419,7 +1439,8 @@
EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::ON).isOk());
ASSERT_TRUE(mReader.takeErrors().empty());
- mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
continue;
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 6d74951..c135298 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -1479,7 +1479,8 @@
/*acquireFence*/ -1);
writer.setLayerDataspace(display.getDisplayId(), layer, common::Dataspace::UNKNOWN);
- writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
@@ -1496,7 +1497,8 @@
/*acquireFence*/ -1);
writer.setLayerSurfaceDamage(display.getDisplayId(), layer,
std::vector<Rect>(1, {0, 0, 10, 10}));
- writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
@@ -1510,7 +1512,8 @@
sp<::android::Fence> presentAndGetFence(
std::optional<ClockMonotonicTimestamp> expectedPresentTime) {
auto& writer = getWriter(getPrimaryDisplayId());
- writer.validateDisplay(getPrimaryDisplayId(), expectedPresentTime);
+ writer.validateDisplay(getPrimaryDisplayId(), expectedPresentTime,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
EXPECT_TRUE(mReader.takeErrors().empty());
@@ -1852,20 +1855,23 @@
TEST_P(GraphicsComposerAidlCommandTest, ValidDisplay) {
auto& writer = getWriter(getPrimaryDisplayId());
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
}
TEST_P(GraphicsComposerAidlCommandTest, AcceptDisplayChanges) {
auto& writer = getWriter(getPrimaryDisplayId());
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
writer.acceptDisplayChanges(getPrimaryDisplayId());
execute();
}
TEST_P(GraphicsComposerAidlCommandTest, PresentDisplay) {
auto& writer = getWriter(getPrimaryDisplayId());
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
writer.presentDisplay(getPrimaryDisplayId());
execute();
}
@@ -1904,7 +1910,8 @@
writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, handle,
/*acquireFence*/ -1);
writer.setLayerDataspace(getPrimaryDisplayId(), layer, Dataspace::UNKNOWN);
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
GTEST_SUCCEED() << "Composition change requested, skipping test";
@@ -1946,7 +1953,8 @@
(float)getPrimaryDisplay().getDisplayHeight()};
configureLayer(getPrimaryDisplay(), layer, Composition::CURSOR, displayFrame, cropRect);
writer.setLayerDataspace(getPrimaryDisplayId(), layer, Dataspace::UNKNOWN);
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
@@ -1961,7 +1969,8 @@
execute();
writer.setLayerCursorPosition(getPrimaryDisplayId(), layer, /*x*/ 0, /*y*/ 0);
- writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
writer.presentDisplay(getPrimaryDisplayId());
execute();
}
@@ -2160,7 +2169,8 @@
auto& writer = getWriter(display.getDisplayId());
writer.setLayerBuffer(display.getDisplayId(), layer, /*slot*/ 0, decorBuffer->handle,
/*acquireFence*/ -1);
- writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute();
if (support) {
ASSERT_TRUE(mReader.takeErrors().empty());
@@ -2864,7 +2874,8 @@
auto& reader = readers.at(displayId);
lock.unlock();
- writer.validateDisplay(displayId, ComposerClientWriter::kNoTimestamp);
+ writer.validateDisplay(displayId, ComposerClientWriter::kNoTimestamp,
+ VtsComposerClient::kNoFrameIntervalNs);
execute(writer, reader);
threads.emplace_back([this, displayId, &readers, &readersMutex]() {
diff --git a/tv/tuner/aidl/default/Dvr.cpp b/tv/tuner/aidl/default/Dvr.cpp
index f997b15..393200c 100644
--- a/tv/tuner/aidl/default/Dvr.cpp
+++ b/tv/tuner/aidl/default/Dvr.cpp
@@ -245,6 +245,11 @@
IPTV_PLAYBACK_STATUS_THRESHOLD_HIGH,
IPTV_PLAYBACK_STATUS_THRESHOLD_LOW);
if (mPlaybackStatus != newStatus) {
+ map<int64_t, std::shared_ptr<Filter>>::iterator it;
+ for (it = mFilters.begin(); it != mFilters.end(); it++) {
+ std::shared_ptr<Filter> currentFilter = it->second;
+ currentFilter->setIptvDvrPlaybackStatus(newStatus);
+ }
mCallback->onPlaybackStatus(newStatus);
mPlaybackStatus = newStatus;
}
@@ -393,7 +398,7 @@
// Read es raw data from the FMQ per meta data built previously
vector<int8_t> frameData;
- map<int64_t, std::shared_ptr<IFilter>>::iterator it;
+ map<int64_t, std::shared_ptr<Filter>>::iterator it;
int pid = 0;
for (int i = 0; i < totalFrames; i++) {
frameData.resize(esMeta[i].len);
@@ -425,7 +430,7 @@
}
void Dvr::startTpidFilter(vector<int8_t> data) {
- map<int64_t, std::shared_ptr<IFilter>>::iterator it;
+ map<int64_t, std::shared_ptr<Filter>>::iterator it;
for (it = mFilters.begin(); it != mFilters.end(); it++) {
uint16_t pid = ((data[1] & 0x1f) << 8) | ((data[2] & 0xff));
if (DEBUG_DVR) {
@@ -446,7 +451,7 @@
}
}
- map<int64_t, std::shared_ptr<IFilter>>::iterator it;
+ map<int64_t, std::shared_ptr<Filter>>::iterator it;
// Handle the output data per filter type
for (it = mFilters.begin(); it != mFilters.end(); it++) {
if (!mDemux->startFilterHandler(it->first).isOk()) {
@@ -518,7 +523,7 @@
return mRecordStatus;
}
-bool Dvr::addPlaybackFilter(int64_t filterId, std::shared_ptr<IFilter> filter) {
+bool Dvr::addPlaybackFilter(int64_t filterId, std::shared_ptr<Filter> filter) {
mFilters[filterId] = filter;
return true;
}
diff --git a/tv/tuner/aidl/default/Dvr.h b/tv/tuner/aidl/default/Dvr.h
index 4af187b..07f95ad 100644
--- a/tv/tuner/aidl/default/Dvr.h
+++ b/tv/tuner/aidl/default/Dvr.h
@@ -95,7 +95,7 @@
bool createDvrMQ();
int writePlaybackFMQ(void* buf, size_t size);
bool writeRecordFMQ(const std::vector<int8_t>& data);
- bool addPlaybackFilter(int64_t filterId, std::shared_ptr<IFilter> filter);
+ bool addPlaybackFilter(int64_t filterId, std::shared_ptr<Filter> filter);
bool removePlaybackFilter(int64_t filterId);
bool readPlaybackFMQ(bool isVirtualFrontend, bool isRecording);
bool processEsDataOnPlayback(bool isVirtualFrontend, bool isRecording);
@@ -110,7 +110,7 @@
DvrType mType;
uint32_t mBufferSize;
std::shared_ptr<IDvrCallback> mCallback;
- std::map<int64_t, std::shared_ptr<IFilter>> mFilters;
+ std::map<int64_t, std::shared_ptr<Filter>> mFilters;
void deleteEventFlag();
bool readDataFromMQ();
diff --git a/tv/tuner/aidl/default/Filter.cpp b/tv/tuner/aidl/default/Filter.cpp
index ba9602e..d8f5dd5 100644
--- a/tv/tuner/aidl/default/Filter.cpp
+++ b/tv/tuner/aidl/default/Filter.cpp
@@ -326,6 +326,8 @@
ALOGV("%s", __FUNCTION__);
mFilterThreadRunning = true;
std::vector<DemuxFilterEvent> events;
+
+ mFilterCount += 1;
// All the filter event callbacks in start are for testing purpose.
switch (mType.mainType) {
case DemuxFilterMainType::TS:
@@ -362,6 +364,8 @@
::ndk::ScopedAStatus Filter::stop() {
ALOGV("%s", __FUNCTION__);
+ mFilterCount -= 1;
+
mFilterThreadRunning = false;
if (mFilterThread.joinable()) {
mFilterThread.join();
@@ -565,6 +569,8 @@
ALOGD("[Filter] filter %" PRIu64 " threadLoop start.", mFilterId);
+ ALOGI("IPTV DVR Playback status on Filter: %d", mIptvDvrPlaybackStatus);
+
// For the first time of filter output, implementation needs to send the filter
// Event Callback without waiting for the DATA_CONSUMED to init the process.
while (mFilterThreadRunning) {
diff --git a/tv/tuner/aidl/default/Filter.h b/tv/tuner/aidl/default/Filter.h
index 0985296..e2a0c7a 100644
--- a/tv/tuner/aidl/default/Filter.h
+++ b/tv/tuner/aidl/default/Filter.h
@@ -147,6 +147,7 @@
bool isMediaFilter() { return mIsMediaFilter; };
bool isPcrFilter() { return mIsPcrFilter; };
bool isRecordFilter() { return mIsRecordFilter; };
+ void setIptvDvrPlaybackStatus(PlaybackStatus newStatus) { mIptvDvrPlaybackStatus = newStatus; };
private:
// Demux service
@@ -286,6 +287,9 @@
int mStartId = 0;
uint8_t mScramblingStatusMonitored = 0;
uint8_t mIpCidMonitored = 0;
+
+ PlaybackStatus mIptvDvrPlaybackStatus;
+ std::atomic<int> mFilterCount = 0;
};
} // namespace tuner