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

Commit 94a82210 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add sensorLocation, sensorRadius, displayId to SensorProps

Bug: 168541000
Test: make -j56 android.hardware.biometrics.fingerprint-update-api

Change-Id: Ia8323a114c74ec9c6680333c868881ac51e6363f
parent 6e862c31
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,4 +20,8 @@ package android.hardware.biometrics.fingerprint;
parcelable SensorProps {
  android.hardware.biometrics.common.CommonProps commonProps;
  android.hardware.biometrics.fingerprint.FingerprintSensorType sensorType;
  int sensorLocationX;
  int sensorLocationY;
  int sensorRadius;
  int displayId;
}
+30 −0
Original line number Diff line number Diff line
@@ -31,5 +31,35 @@ parcelable SensorProps {
     * sensor.
     */
    FingerprintSensorType sensorType;

    /**
     * The location of the center of the sensor if applicable. For example,
     * sensors of FingerprintSensorType::UNDER_DISPLAY_* would report this
     * value as the distance in pixels, measured from the left edge of the
     * screen.
     */
    int sensorLocationX;

    /**
     * The location of the center of the sensor if applicable. For example,
     * sensors of FingerprintSensorType::UNDER_DISPLAY_* would report this
     * value as the distance in pixels, measured from the top edge of the
     * screen.
     */
    int sensorLocationY;

    /**
     * The radius of the sensor if applicable. For example, sensors of
     * FingerprintSensorType::UNDER_DISPLAY_* would report this value as
     * the radius of the sensor, in pixels.
     */
    int sensorRadius;

    /**
     * For sensors of FingerprintSensorType::UNDER_DISPLAY_*, this must
     * correspond to the android.hardware.DisplayManager#getDisplay Android
     * API.
     */
    int displayId;
}
+5 −1
Original line number Diff line number Diff line
@@ -30,7 +30,11 @@ ndk::ScopedAStatus Fingerprint::getSensorProps(std::vector<SensorProps>* return_
            kSensorStrength,
            kMaxEnrollmentsPerUser};
    SensorProps props = {commonProps,
            kSensorType};
            kSensorType,
            0 /* sensorLocationX */,
            0 /* sensorLocationY */,
            0 /* sensorRadius */,
            0 /* displayId */};
    return_val->push_back(props);
    return ndk::ScopedAStatus::ok();
}