This source file includes following definitions.
- INVALID
- NONE
- IMPLICIT_PASSPHRASE
- KEYSTORE_PASSPHRASE
- FROZEN_IMPLICIT_PASSPHRASE
- CUSTOM_PASSPHRASE
- fromInternalValue
- internalValue
- describeContents
- writeToParcel
package org.chromium.sync.internal_api.pub;
import android.os.Parcel;
import android.os.Parcelable;
public enum SyncDecryptionPassphraseType implements Parcelable {
INVALID(-2),
NONE(-1),
IMPLICIT_PASSPHRASE(0),
KEYSTORE_PASSPHRASE(1),
FROZEN_IMPLICIT_PASSPHRASE(2),
CUSTOM_PASSPHRASE(3);
public static Parcelable.Creator CREATOR =
new Parcelable.Creator<SyncDecryptionPassphraseType>() {
@Override
public SyncDecryptionPassphraseType createFromParcel(Parcel parcel) {
return fromInternalValue(parcel.readInt());
}
@Override
public SyncDecryptionPassphraseType[] newArray(int size) {
return new SyncDecryptionPassphraseType[size];
}
};
public static SyncDecryptionPassphraseType fromInternalValue(int value) {
for (SyncDecryptionPassphraseType type : values()) {
if (type.internalValue() == value) {
return type;
}
}
return INVALID;
}
private final int mNativeValue;
private SyncDecryptionPassphraseType(int nativeValue) {
mNativeValue = nativeValue;
}
public int internalValue() {
return mNativeValue;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mNativeValue);
}
}