Created
September 6, 2015 11:53
-
-
Save bitristan/1a318ba08cab05013d33 to your computer and use it in GitHub Desktop.
android aidl enum parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum RecognitionTaskType implements Parcelable { | |
HOTWORD, | |
OFFLINE, | |
ONLINE, | |
MIX, | |
RECORD_ONLY; | |
@Override | |
public int describeContents() { | |
return 0; | |
} | |
@Override | |
public void writeToParcel(Parcel dest, int flags) { | |
dest.writeString(name()); | |
} | |
public static final Creator<RecognitionTaskType> CREATOR = new Creator<RecognitionTaskType>() { | |
@Override | |
public RecognitionTaskType createFromParcel(final Parcel source) { | |
return RecognitionTaskType.valueOf(source.readString()); | |
} | |
@Override | |
public RecognitionTaskType[] newArray(final int size) { | |
return new RecognitionTaskType[size]; | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment