Change get/set IsSyncable() methods to static. Add isUserFacing flag to SyncAdapterType. Update api file.

This commit is contained in:
Jim Miller
2009-08-17 15:47:14 -07:00
parent d871167284
commit 20ea6ce0e8
3 changed files with 16 additions and 4 deletions

View File

@@ -27037,7 +27037,7 @@
abstract="false" abstract="false"
native="false" native="false"
synchronized="false" synchronized="false"
static="false" static="true"
final="false" final="false"
deprecated="not deprecated" deprecated="not deprecated"
visibility="public" visibility="public"
@@ -27349,7 +27349,7 @@
abstract="false" abstract="false"
native="false" native="false"
synchronized="false" synchronized="false"
static="false" static="true"
final="false" final="false"
deprecated="not deprecated" deprecated="not deprecated"
visibility="public" visibility="public"
@@ -35797,6 +35797,17 @@
visibility="public" visibility="public"
> >
</field> </field>
<field name="isUserFacing"
type="boolean"
transient="false"
volatile="false"
value="true"
static="false"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
</class> </class>
<interface name="SyncStatusObserver" <interface name="SyncStatusObserver"
abstract="true" abstract="true"

View File

@@ -1015,7 +1015,7 @@ public abstract class ContentResolver {
* Check if this account/provider is syncable. * Check if this account/provider is syncable.
* @return >0 if it is syncable, 0 if not, and <0 if the state isn't known yet. * @return >0 if it is syncable, 0 if not, and <0 if the state isn't known yet.
*/ */
public int getIsSyncable(Account account, String authority) { public static int getIsSyncable(Account account, String authority) {
try { try {
return getContentService().getIsSyncable(account, authority); return getContentService().getIsSyncable(account, authority);
} catch (RemoteException e) { } catch (RemoteException e) {
@@ -1027,7 +1027,7 @@ public abstract class ContentResolver {
* Set whether this account/provider is syncable. * Set whether this account/provider is syncable.
* @param syncable >0 denotes syncable, 0 means not syncable, <0 means unknown * @param syncable >0 denotes syncable, 0 means not syncable, <0 means unknown
*/ */
public void setIsSyncable(Account account, String authority, int syncable) { public static void setIsSyncable(Account account, String authority, int syncable) {
try { try {
getContentService().setIsSyncable(account, authority, syncable); getContentService().setIsSyncable(account, authority, syncable);
} catch (RemoteException e) { } catch (RemoteException e) {

View File

@@ -27,6 +27,7 @@ import android.os.Parcel;
public class SyncAdapterType implements Parcelable { public class SyncAdapterType implements Parcelable {
public final String authority; public final String authority;
public final String accountType; public final String accountType;
public final boolean isUserFacing = true; // TODO: implement logic to set this
public SyncAdapterType(String authority, String accountType) { public SyncAdapterType(String authority, String accountType) {
if (TextUtils.isEmpty(authority)) { if (TextUtils.isEmpty(authority)) {