Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38a1081c authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 24514 into eclair

* changes:
  Add smallIcon and accountPreferences references to AuthenticatorDescription. Update after path conflict.
parents f3f72003 70e1ad7d
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -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"
+6 −1
Original line number Diff line number Diff line
@@ -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();
        }
+13 −2
Original line number Diff line number Diff line
@@ -7,15 +7,20 @@ public class AuthenticatorDescription implements Parcelable {
    final public String type;
    final public int labelId;
    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 =
+4 −0
Original line number Diff line number Diff line
@@ -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>

    <!-- =============================== -->
+2 −0
Original line number Diff line number Diff line
@@ -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>
Loading