FileDocCategorySizeDatePackage
AuthenticatorDescription.javaAPI DocAndroid 5.1 API5142Thu Mar 12 22:22:08 GMT 2015android.accounts

AuthenticatorDescription

public class AuthenticatorDescription extends Object implements android.os.Parcelable
A {@link Parcelable} value type that contains information about an account authenticator.

Fields Summary
public final String
type
The string that uniquely identifies an authenticator
public final int
labelId
A resource id of a label for the authenticator that is suitable for displaying
public final int
iconId
A resource id of a icon for the authenticator
public final int
smallIconId
A resource id of a smaller icon for the authenticator
public final int
accountPreferencesId
A resource id for a hierarchy of PreferenceScreen to be added to the settings page for the account. See {@link AbstractAccountAuthenticator} for an example.
public final String
packageName
The package name that can be used to lookup the resources from above.
public final boolean
customTokens
Authenticator handles its own token caching and permission screen
public static final Creator
CREATOR
Used to create the object from a parcel.
Constructors Summary
public AuthenticatorDescription(String type, String packageName, int labelId, int iconId, int smallIconId, int prefId, boolean customTokens)
A constructor for a full AuthenticatorDescription

        if (type == null) throw new IllegalArgumentException("type cannot be null");
        if (packageName == null) throw new IllegalArgumentException("packageName cannot be null");
        this.type = type;
        this.packageName = packageName;
        this.labelId = labelId;
        this.iconId = iconId;
        this.smallIconId = smallIconId;
        this.accountPreferencesId = prefId;
        this.customTokens = customTokens;
    
public AuthenticatorDescription(String type, String packageName, int labelId, int iconId, int smallIconId, int prefId)

        this(type, packageName, labelId, iconId, smallIconId, prefId, false);
    
private AuthenticatorDescription(String type)

        this.type = type;
        this.packageName = null;
        this.labelId = 0;
        this.iconId = 0;
        this.smallIconId = 0;
        this.accountPreferencesId = 0;
        this.customTokens = false;
    
private AuthenticatorDescription(android.os.Parcel source)

        this.type = source.readString();
        this.packageName = source.readString();
        this.labelId = source.readInt();
        this.iconId = source.readInt();
        this.smallIconId = source.readInt();
        this.accountPreferencesId = source.readInt();
        this.customTokens = source.readByte() == 1;
    
Methods Summary
public intdescribeContents()

inheritDoc

        return 0;
    
public booleanequals(java.lang.Object o)
Compares the type only, suitable for key comparisons.

        if (o == this) return true;
        if (!(o instanceof AuthenticatorDescription)) return false;
        final AuthenticatorDescription other = (AuthenticatorDescription) o;
        return type.equals(other.type);
    
public inthashCode()
Returns the hashcode of the type only.

        return type.hashCode();
    
public static android.accounts.AuthenticatorDescriptionnewKey(java.lang.String type)
A factory method for creating an AuthenticatorDescription that can be used as a key to identify the authenticator by its type.

        if (type == null) throw new IllegalArgumentException("type cannot be null");
        return new AuthenticatorDescription(type);
    
public java.lang.StringtoString()

        return "AuthenticatorDescription {type=" + type + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

inheritDoc

        dest.writeString(type);
        dest.writeString(packageName);
        dest.writeInt(labelId);
        dest.writeInt(iconId);
        dest.writeInt(smallIconId);
        dest.writeInt(accountPreferencesId);
        dest.writeByte((byte) (customTokens ? 1 : 0));