am 38a1081c: Merge change 24514 into eclair
Merge commit '38a1081cad9385073d80d358decf04f6b2fd5723' into eclair-plus-aosp * commit '38a1081cad9385073d80d358decf04f6b2fd5723': Add smallIcon and accountPreferences references to AuthenticatorDescription. Update after path conflict.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user