Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7998580 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add additional face SensorProps"

parents 0c11bf95 bad76851
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -21,4 +21,9 @@ parcelable SensorProps {
  android.hardware.biometrics.common.CommonProps commonProps;
  android.hardware.biometrics.face.FaceSensorType sensorType;
  boolean halControlsPreview;
  int enrollPreviewWidth;
  int enrollPreviewHeight;
  float enrollTranslationX;
  float enrollTranslationY;
  float enrollPreviewScale;
}
+31 −0
Original line number Diff line number Diff line
@@ -39,5 +39,36 @@ parcelable SensorProps {
     * the framework.
     */
    boolean halControlsPreview;

    /**
     * For implementations where the HAL manages the preview, this is the width, in pixels, of each
     * frame that the camera is set up to output.
     */
    int enrollPreviewWidth;

    /**
     * For implementations where the HAL manages the preview, this is the height, in pixels, of
     * each frame that the camera is set up to output.
     */
    int enrollPreviewHeight;

    /**
     * For implementations where the HAL manages the preview, this is the distance in pixels that
     * the enrollment preview should be translated. This is typically used by devices where the
     * camera used for enrollment preview is not centered.
     */
    float enrollTranslationX;

    /**
     * For implementations where the HAL manages the preview, this is the distance in pixels that
     * the enrollment preview should be translated.
     */
    float enrollTranslationY;

    /**
     * For implementations where the HAL manages the preview, this is the scale factor that should
     * be applied when configuring the preview texture.
     */
    float enrollPreviewScale;
}
+5 −0
Original line number Diff line number Diff line
@@ -46,6 +46,11 @@ ndk::ScopedAStatus Face::getSensorProps(std::vector<SensorProps>* return_val) {
    props.commonProps = std::move(commonProps);
    props.sensorType = kSensorType;
    props.halControlsPreview = kHalControlsPreview;
    props.enrollPreviewWidth = 1080;
    props.enrollPreviewHeight = 1920;
    props.enrollTranslationX = 100.f;
    props.enrollTranslationY = 50.f;
    props.enrollPreviewScale = 1.f;

    *return_val = {std::move(props)};
    return ndk::ScopedAStatus::ok();