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

Commit a8a7327b authored by Sharon Su's avatar Sharon Su
Browse files

Add another confidence code (very high) in HotwordRejectedResult

Bug: 290951024
Test: atest CtsVoiceInteractionTestCases
Change-Id: Icff3c834e4f94a254839b3485500814e0304c850
parent a6b5849a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12929,6 +12929,7 @@ package android.service.voice {
    field public static final int CONFIDENCE_LEVEL_LOW = 1; // 0x1
    field public static final int CONFIDENCE_LEVEL_MEDIUM = 2; // 0x2
    field public static final int CONFIDENCE_LEVEL_NONE = 0; // 0x0
    field @FlaggedApi("android.service.voice.flags.allow_hotword_bump_egress") public static final int CONFIDENCE_LEVEL_VERY_HIGH = 4; // 0x4
    field @NonNull public static final android.os.Parcelable.Creator<android.service.voice.HotwordRejectedResult> CREATOR;
  }
+15 −5
Original line number Diff line number Diff line
@@ -16,9 +16,11 @@

package android.service.voice;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.os.Parcelable;
import android.service.voice.flags.Flags;

import com.android.internal.util.DataClass;

@@ -53,12 +55,17 @@ public final class HotwordRejectedResult implements Parcelable {
    /** High confidence in hotword detector result. */
    public static final int CONFIDENCE_LEVEL_HIGH = 3;

    /** Very high confidence in hotword detector result. **/
    @FlaggedApi(Flags.FLAG_ALLOW_HOTWORD_BUMP_EGRESS)
    public static final int CONFIDENCE_LEVEL_VERY_HIGH = 4;

    /** @hide */
    @IntDef(prefix = {"CONFIDENCE_LEVEL_"}, value = {
            CONFIDENCE_LEVEL_NONE,
            CONFIDENCE_LEVEL_LOW,
            CONFIDENCE_LEVEL_MEDIUM,
            CONFIDENCE_LEVEL_HIGH
            CONFIDENCE_LEVEL_HIGH,
            CONFIDENCE_LEVEL_VERY_HIGH
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface HotwordConfidenceLevelValue {
@@ -91,9 +98,10 @@ public final class HotwordRejectedResult implements Parcelable {
        CONFIDENCE_LEVEL_NONE,
        CONFIDENCE_LEVEL_LOW,
        CONFIDENCE_LEVEL_MEDIUM,
        CONFIDENCE_LEVEL_HIGH
        CONFIDENCE_LEVEL_HIGH,
        CONFIDENCE_LEVEL_VERY_HIGH
    })
    @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    @DataClass.Generated.Member
    public @interface ConfidenceLevel {}

@@ -109,6 +117,8 @@ public final class HotwordRejectedResult implements Parcelable {
                    return "CONFIDENCE_LEVEL_MEDIUM";
            case CONFIDENCE_LEVEL_HIGH:
                    return "CONFIDENCE_LEVEL_HIGH";
            case CONFIDENCE_LEVEL_VERY_HIGH:
                    return "CONFIDENCE_LEVEL_VERY_HIGH";
            default: return Integer.toHexString(value);
        }
    }
@@ -259,10 +269,10 @@ public final class HotwordRejectedResult implements Parcelable {
    }

    @DataClass.Generated(
            time = 1621961370106L,
            time = 1701990933632L,
            codegenVersion = "1.0.23",
            sourceFile = "frameworks/base/core/java/android/service/voice/HotwordRejectedResult.java",
            inputSignatures = "public static final  int CONFIDENCE_LEVEL_NONE\npublic static final  int CONFIDENCE_LEVEL_LOW\npublic static final  int CONFIDENCE_LEVEL_MEDIUM\npublic static final  int CONFIDENCE_LEVEL_HIGH\nprivate final @android.service.voice.HotwordRejectedResult.HotwordConfidenceLevelValue int mConfidenceLevel\nprivate static  int defaultConfidenceLevel()\nclass HotwordRejectedResult extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=true, genEqualsHashCode=true, genHiddenConstDefs=true, genParcelable=true, genToString=true)")
            inputSignatures = "public static final  int CONFIDENCE_LEVEL_NONE\npublic static final  int CONFIDENCE_LEVEL_LOW\npublic static final  int CONFIDENCE_LEVEL_MEDIUM\npublic static final  int CONFIDENCE_LEVEL_HIGH\npublic static final @android.annotation.FlaggedApi int CONFIDENCE_LEVEL_VERY_HIGH\nprivate final @android.service.voice.HotwordRejectedResult.HotwordConfidenceLevelValue int mConfidenceLevel\nprivate static  int defaultConfidenceLevel()\nclass HotwordRejectedResult extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=true, genEqualsHashCode=true, genHiddenConstDefs=true, genParcelable=true, genToString=true)")
    @Deprecated
    private void __metadata() {}

+7 −0
Original line number Diff line number Diff line
@@ -6,3 +6,10 @@ flag {
    description: "This flag allows the hotword detection service to egress training data to the default assistant."
    bug: "296074924"
}

flag {
    name: "allow_hotword_bump_egress"
    namespace: "machine_learning"
    description: "This flag allows hotword detection service to egress reason code for hotword bump."
    bug: "290951024"
}