Loading core/java/android/accounts/AccountAuthenticatorCache.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.pm.RegisteredServicesCache; import android.content.res.TypedArray; import android.content.res.TypedArray; import android.content.Context; import android.content.Context; import android.util.AttributeSet; import android.util.AttributeSet; import android.text.TextUtils; /** /** * A cache of services that export the {@link IAccountAuthenticator} interface. This cache * A cache of services that export the {@link IAccountAuthenticator} interface. This cache Loading Loading @@ -48,6 +49,9 @@ import android.util.AttributeSet; com.android.internal.R.styleable.AccountAuthenticator_label, 0); com.android.internal.R.styleable.AccountAuthenticator_label, 0); final int iconId = sa.getResourceId( final int iconId = sa.getResourceId( com.android.internal.R.styleable.AccountAuthenticator_icon, 0); com.android.internal.R.styleable.AccountAuthenticator_icon, 0); if (TextUtils.isEmpty(accountType)) { return null; } return new AuthenticatorDescription(accountType, packageName, labelId, iconId); return new AuthenticatorDescription(accountType, packageName, labelId, iconId); } finally { } finally { sa.recycle(); sa.recycle(); Loading core/java/android/accounts/AuthenticatorDescription.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -10,6 +10,8 @@ public class AuthenticatorDescription implements Parcelable { final public String packageName; final public String packageName; public AuthenticatorDescription(String type, String packageName, int labelId, int iconId) { public AuthenticatorDescription(String type, String packageName, int labelId, int iconId) { if (type == null) throw new IllegalArgumentException("type cannot be null"); if (packageName == null) throw new IllegalArgumentException("packageName cannot be null"); this.type = type; this.type = type; this.packageName = packageName; this.packageName = packageName; this.labelId = labelId; this.labelId = labelId; Loading @@ -17,6 +19,7 @@ public class AuthenticatorDescription implements Parcelable { } } public static AuthenticatorDescription newKey(String type) { public static AuthenticatorDescription newKey(String type) { if (type == null) throw new IllegalArgumentException("type cannot be null"); return new AuthenticatorDescription(type); return new AuthenticatorDescription(type); } } Loading core/java/android/content/AbstractThreadedSyncAdapter.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,10 @@ public abstract class AbstractThreadedSyncAdapter { mAutoInitialize = autoInitialize; mAutoInitialize = autoInitialize; } } public Context getContext() { return mContext; } class ISyncAdapterImpl extends ISyncAdapter.Stub { class ISyncAdapterImpl extends ISyncAdapter.Stub { public void startSync(ISyncContext syncContext, String authority, Account account, public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) { Bundle extras) { Loading Loading
core/java/android/accounts/AccountAuthenticatorCache.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.pm.RegisteredServicesCache; import android.content.res.TypedArray; import android.content.res.TypedArray; import android.content.Context; import android.content.Context; import android.util.AttributeSet; import android.util.AttributeSet; import android.text.TextUtils; /** /** * A cache of services that export the {@link IAccountAuthenticator} interface. This cache * A cache of services that export the {@link IAccountAuthenticator} interface. This cache Loading Loading @@ -48,6 +49,9 @@ import android.util.AttributeSet; com.android.internal.R.styleable.AccountAuthenticator_label, 0); com.android.internal.R.styleable.AccountAuthenticator_label, 0); final int iconId = sa.getResourceId( final int iconId = sa.getResourceId( com.android.internal.R.styleable.AccountAuthenticator_icon, 0); com.android.internal.R.styleable.AccountAuthenticator_icon, 0); if (TextUtils.isEmpty(accountType)) { return null; } return new AuthenticatorDescription(accountType, packageName, labelId, iconId); return new AuthenticatorDescription(accountType, packageName, labelId, iconId); } finally { } finally { sa.recycle(); sa.recycle(); Loading
core/java/android/accounts/AuthenticatorDescription.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -10,6 +10,8 @@ public class AuthenticatorDescription implements Parcelable { final public String packageName; final public String packageName; public AuthenticatorDescription(String type, String packageName, int labelId, int iconId) { public AuthenticatorDescription(String type, String packageName, int labelId, int iconId) { if (type == null) throw new IllegalArgumentException("type cannot be null"); if (packageName == null) throw new IllegalArgumentException("packageName cannot be null"); this.type = type; this.type = type; this.packageName = packageName; this.packageName = packageName; this.labelId = labelId; this.labelId = labelId; Loading @@ -17,6 +19,7 @@ public class AuthenticatorDescription implements Parcelable { } } public static AuthenticatorDescription newKey(String type) { public static AuthenticatorDescription newKey(String type) { if (type == null) throw new IllegalArgumentException("type cannot be null"); return new AuthenticatorDescription(type); return new AuthenticatorDescription(type); } } Loading
core/java/android/content/AbstractThreadedSyncAdapter.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,10 @@ public abstract class AbstractThreadedSyncAdapter { mAutoInitialize = autoInitialize; mAutoInitialize = autoInitialize; } } public Context getContext() { return mContext; } class ISyncAdapterImpl extends ISyncAdapter.Stub { class ISyncAdapterImpl extends ISyncAdapter.Stub { public void startSync(ISyncContext syncContext, String authority, Account account, public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) { Bundle extras) { Loading