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

Commit 0db30899 authored by Sandeep Siddhartha's avatar Sandeep Siddhartha
Browse files

Use @IntDef for manage actions

Change-Id: I12473fb82bf865af36aaf681a1b12a19e9f218fc
parent 46db9340
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -82,6 +82,15 @@ public class AlwaysOnHotwordDetector {
    private static final int STATE_NOT_READY = 0;

    // Keyphrase management actions. Used in getManageIntent() ----//
    /** @hide */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(value = {
                MANAGE_ACTION_ENROLL,
                MANAGE_ACTION_RE_ENROLL,
                MANAGE_ACTION_UN_ENROLL
            })
    public @interface ManageActions {}

    /** Indicates that we need to enroll. */
    public static final int MANAGE_ACTION_ENROLL = 0;
    /** Indicates that we need to re-enroll. */
@@ -360,7 +369,7 @@ public class AlwaysOnHotwordDetector {
     *         This may happen if another detector has been instantiated or the
     *         {@link VoiceInteractionService} hosting this detector has been shut down.
     */
    public Intent getManageIntent(int action) {
    public Intent getManageIntent(@ManageActions int action) {
        if (DBG) Slog.d(TAG, "getManageIntent(" + action + ")");
        synchronized (mLock) {
            return getManageIntentLocked(action);