am bd75da5d: am 38a1081c: Merge change 24514 into eclair

Merge commit 'bd75da5da4a2dea7cb57a157f63c76bfb0c4d081'

* commit 'bd75da5da4a2dea7cb57a157f63c76bfb0c4d081':
  Add smallIcon and accountPreferences references to AuthenticatorDescription. Update after path conflict.
This commit is contained in:
Jim Miller
2009-09-10 18:24:46 -07:00
committed by Android Git Automerger
6 changed files with 73 additions and 3 deletions

View File

@@ -1659,6 +1659,17 @@
visibility="public"
>
</field>
<field name="accountPreferences"
type="int"
transient="false"
volatile="false"
value="16843423"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="accountType"
type="int"
transient="false"
@@ -7093,6 +7104,17 @@
visibility="public"
>
</field>
<field name="smallIcon"
type="int"
transient="false"
volatile="false"
value="16843422"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="smallScreens"
type="int"
transient="false"
@@ -14543,6 +14565,10 @@
</parameter>
<parameter name="iconId" type="int">
</parameter>
<parameter name="smallIconId" type="int">
</parameter>
<parameter name="prefId" type="int">
</parameter>
</constructor>
<method name="describeContents"
return="int"
@@ -14593,6 +14619,16 @@
visibility="public"
>
</field>
<field name="accountPreferencesId"
type="int"
transient="false"
volatile="false"
static="false"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="iconId"
type="int"
transient="false"
@@ -14623,6 +14659,16 @@
visibility="public"
>
</field>
<field name="smallIconId"
type="int"
transient="false"
volatile="false"
static="false"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="type"
type="java.lang.String"
transient="false"

View File

@@ -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();
}

View File

@@ -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 =

View File

@@ -3438,6 +3438,10 @@
<attr name="label"/>
<!-- the icon of the authenticator. -->
<attr name="icon"/>
<!-- smaller icon of the authenticator -->
<attr name="smallIcon" format="reference"/>
<!-- a preferences.xml file for authenticator-specific settings -->
<attr name="accountPreferences" format="reference"/>
</declare-styleable>
<!-- =============================== -->

View File

@@ -65,4 +65,6 @@
<item type="id" name="startSelectingText" />
<item type="id" name="stopSelectingText" />
<item type="id" name="addToDictionary" />
<item type="id" name="accountPreferences" />
<item type="id" name="smallIcon" />
</resources>

View File

@@ -1162,6 +1162,8 @@
<public type="attr" name="supportsUploading" />
<public type="attr" name="killAfterRestore" />
<public type="attr" name="restoreNeedsApplication" />
<public type="attr" name="smallIcon" />
<public type="attr" name="accountPreferences" />
<public type="style" name="Theme.Wallpaper" />
<public type="style" name="Theme.Wallpaper.NoTitleBar" />