AuthenticatorDescriptionpublic class AuthenticatorDescription extends Object implements android.os.ParcelableA {@link Parcelable} value type that contains information about an account authenticator. |
Fields Summary |
---|
public final String | typeThe string that uniquely identifies an authenticator | public final int | labelIdA resource id of a label for the authenticator that is suitable for displaying | public final int | iconIdA resource id of a icon for the authenticator | public final int | smallIconIdA resource id of a smaller icon for the authenticator | public final int | accountPreferencesIdA 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 | packageNameThe package name that can be used to lookup the resources from above. | public final boolean | customTokensAuthenticator handles its own token caching and permission screen | public static final Creator | CREATORUsed 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 int | describeContents()
return 0;
| public boolean | equals(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 int | hashCode()Returns the hashcode of the type only.
return type.hashCode();
| public static android.accounts.AuthenticatorDescription | newKey(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.String | toString()
return "AuthenticatorDescription {type=" + type + "}";
| public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeString(type);
dest.writeString(packageName);
dest.writeInt(labelId);
dest.writeInt(iconId);
dest.writeInt(smallIconId);
dest.writeInt(accountPreferencesId);
dest.writeByte((byte) (customTokens ? 1 : 0));
|
|