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

Commit 46afac61 authored by Austin Borger's avatar Austin Borger Committed by Android (Google) Code Review
Browse files

Merge "Add annotations to Camera2 simple objects' methods."

parents 7f02a673 15e7c2ce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18434,7 +18434,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
@@ -18449,7 +18449,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;