diff options
| author | Jim Miller <jaggies@google.com> | 2009-09-09 22:45:47 -0700 |
|---|---|---|
| committer | Jim Miller <jaggies@google.com> | 2009-09-10 18:10:53 -0700 |
| commit | 70e1ad7d99c95967e3c0257bddc7b4ec6c403372 (patch) | |
| tree | 65ab9a67e7d4ae4267a1988201b3ad0114eb34ea /core/java/android/accounts | |
| parent | ebebf9c36c0112d99cb2e11953febdff8ba5ff23 (diff) | |
| download | frameworks_base-70e1ad7d99c95967e3c0257bddc7b4ec6c403372.zip frameworks_base-70e1ad7d99c95967e3c0257bddc7b4ec6c403372.tar.gz frameworks_base-70e1ad7d99c95967e3c0257bddc7b4ec6c403372.tar.bz2 | |
Add smallIcon and accountPreferences references to AuthenticatorDescription. Update after path conflict.
Update API for new AuthenticatorDescription preferences.xml
Diffstat (limited to 'core/java/android/accounts')
| -rw-r--r-- | core/java/android/accounts/AccountAuthenticatorCache.java | 7 | ||||
| -rw-r--r-- | core/java/android/accounts/AuthenticatorDescription.java | 15 |
2 files changed, 19 insertions, 3 deletions
diff --git a/core/java/android/accounts/AccountAuthenticatorCache.java b/core/java/android/accounts/AccountAuthenticatorCache.java index 82cadd5..fdc5fbf 100644 --- a/core/java/android/accounts/AccountAuthenticatorCache.java +++ b/core/java/android/accounts/AccountAuthenticatorCache.java @@ -49,10 +49,15 @@ import android.text.TextUtils; com.android.internal.R.styleable.AccountAuthenticator_label, 0); final int iconId = sa.getResourceId( com.android.internal.R.styleable.AccountAuthenticator_icon, 0); + final int smallIconId = sa.getResourceId( + com.android.internal.R.styleable.AccountAuthenticator_smallIcon, 0); + final int prefId = sa.getResourceId( + com.android.internal.R.styleable.AccountAuthenticator_accountPreferences, 0); if (TextUtils.isEmpty(accountType)) { return null; } - return new AuthenticatorDescription(accountType, packageName, labelId, iconId); + return new AuthenticatorDescription(accountType, packageName, labelId, iconId, + smallIconId, prefId); } finally { sa.recycle(); } diff --git a/core/java/android/accounts/AuthenticatorDescription.java b/core/java/android/accounts/AuthenticatorDescription.java index 672e648..28673b4 100644 --- a/core/java/android/accounts/AuthenticatorDescription.java +++ b/core/java/android/accounts/AuthenticatorDescription.java @@ -6,16 +6,21 @@ import android.os.Parcel; public class AuthenticatorDescription implements Parcelable { final public String type; final public int labelId; - final public int iconId; + final public int iconId; + final public int smallIconId; + final public int accountPreferencesId; final public String packageName; - public AuthenticatorDescription(String type, String packageName, int labelId, int iconId) { + public AuthenticatorDescription(String type, String packageName, int labelId, int iconId, + int smallIconId, int prefId) { 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; } public static AuthenticatorDescription newKey(String type) { @@ -28,6 +33,8 @@ public class AuthenticatorDescription implements Parcelable { this.packageName = null; this.labelId = 0; this.iconId = 0; + this.smallIconId = 0; + this.accountPreferencesId = 0; } private AuthenticatorDescription(Parcel source) { @@ -35,6 +42,8 @@ public class AuthenticatorDescription implements Parcelable { this.packageName = source.readString(); this.labelId = source.readInt(); this.iconId = source.readInt(); + this.smallIconId = source.readInt(); + this.accountPreferencesId = source.readInt(); } public int describeContents() { @@ -57,6 +66,8 @@ public class AuthenticatorDescription implements Parcelable { dest.writeString(packageName); dest.writeInt(labelId); dest.writeInt(iconId); + dest.writeInt(smallIconId); + dest.writeInt(accountPreferencesId); } public static final Creator<AuthenticatorDescription> CREATOR = |
