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

Commit 15e7c2ce authored by Austin Borger's avatar Austin Borger
Browse files

Add annotations to Camera2 simple objects' methods.

Test: Built locally.
Bug: 236187068
Change-Id: Ie68d712db54b770a4d27f520912b45ed03fc449b
parent 5a15ad16
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18219,7 +18219,7 @@ package android.hardware.camera2.params {
    method public android.graphics.Point getLeftEyePosition();
    method public android.graphics.Point getMouthPosition();
    method public android.graphics.Point getRightEyePosition();
    method public int getScore();
    method @IntRange(from=android.hardware.camera2.params.Face.SCORE_MIN, to=android.hardware.camera2.params.Face.SCORE_MAX) public int getScore();
    field public static final int ID_UNSUPPORTED = -1; // 0xffffffff
    field public static final int SCORE_MAX = 100; // 0x64
    field public static final int SCORE_MIN = 1; // 0x1
@@ -18234,7 +18234,7 @@ package android.hardware.camera2.params {
    method @NonNull public android.hardware.camera2.params.Face.Builder setLeftEyePosition(@NonNull android.graphics.Point);
    method @NonNull public android.hardware.camera2.params.Face.Builder setMouthPosition(@NonNull android.graphics.Point);
    method @NonNull public android.hardware.camera2.params.Face.Builder setRightEyePosition(@NonNull android.graphics.Point);
    method @NonNull public android.hardware.camera2.params.Face.Builder setScore(int);
    method @NonNull public android.hardware.camera2.params.Face.Builder setScore(@IntRange(from=android.hardware.camera2.params.Face.SCORE_MIN, to=android.hardware.camera2.params.Face.SCORE_MAX) int);
  }
  public final class InputConfiguration {
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ public final class DeviceStateSensorOrientationMap {
         *
         */
        @SuppressLint("MissingGetterMatchingBuilder")
        public @NonNull Builder addOrientationForState(long deviceState, long angle) {
        public @NonNull Builder addOrientationForState(@DeviceState long deviceState, long angle) {
            if (angle % 90 != 0) {
                throw new IllegalArgumentException("Sensor orientation not divisible by 90: "
                        + angle);
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

package android.hardware.camera2.params;

import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Point;
@@ -173,6 +174,7 @@ public final class Face {
     * @see #SCORE_MAX
     * @see #SCORE_MIN
     */
    @IntRange(from = SCORE_MIN, to = SCORE_MAX)
    public int getScore() {
        return mScore;
    }
@@ -377,7 +379,7 @@ public final class Face {
         * @param score Confidence level between {@value #SCORE_MIN}-{@value #SCORE_MAX}.
         * @return This builder.
         */
        public @NonNull Builder setScore(int score) {
        public @NonNull Builder setScore(@IntRange(from = SCORE_MIN, to = SCORE_MAX) int score) {
            checkNotUsed();
            checkScore(score);
            mBuilderFieldsSet |= FIELD_SCORE;