Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7870,6 +7870,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9060,6 +9061,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8158,6 +8158,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9374,6 +9375,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7873,6 +7873,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9065,6 +9066,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long); core/java/android/content/ContentResolver.java +7 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,13 @@ public abstract class ContentResolver { */ public static final String SYNC_EXTRAS_EXPEDITED = "expedited"; /** * If this extra is set to true, the sync request will be scheduled * only when the device is plugged in. This is equivalent to calling * setRequiresCharging(true) on {@link SyncRequest}. */ public static final String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; /** * @deprecated instead use * {@link #SYNC_EXTRAS_MANUAL} Loading core/java/android/content/SyncRequest.java +17 −1 Original line number Diff line number Diff line Loading @@ -246,6 +246,10 @@ public class SyncRequest implements Parcelable { * this sync is bound to a provider), otherwise null. */ private String mAuthority; /** * Whether the sync requires the phone to be plugged in. */ private boolean mRequiresCharging; public Builder() { } Loading Loading @@ -341,6 +345,15 @@ public class SyncRequest implements Parcelable { return this; } /** * Specify whether the sync requires the phone to be plugged in. * @param requiresCharging true if sync requires the phone to be plugged in. Default false. */ public Builder setRequiresCharging(boolean requiresCharging) { mRequiresCharging = true; return this; } /** * Specify an authority and account for this transfer. * Loading Loading @@ -499,6 +512,9 @@ public class SyncRequest implements Parcelable { if (mDisallowMetered) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_DISALLOW_METERED, true); } if (mRequiresCharging) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_REQUIRE_CHARGING, true); } if (mIgnoreSettings) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true); } Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7870,6 +7870,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9060,6 +9061,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8158,6 +8158,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9374,6 +9375,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7873,6 +7873,7 @@ package android.content { field public static final java.lang.String SYNC_EXTRAS_INITIALIZE = "initialize"; field public static final java.lang.String SYNC_EXTRAS_MANUAL = "force"; field public static final java.lang.String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override"; field public static final java.lang.String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; field public static final java.lang.String SYNC_EXTRAS_UPLOAD = "upload"; field public static final int SYNC_OBSERVER_TYPE_ACTIVE = 4; // 0x4 field public static final int SYNC_OBSERVER_TYPE_PENDING = 2; // 0x2 Loading Loading @@ -9065,6 +9066,7 @@ package android.content { method public android.content.SyncRequest.Builder setIgnoreSettings(boolean); method public android.content.SyncRequest.Builder setManual(boolean); method public android.content.SyncRequest.Builder setNoRetry(boolean); method public android.content.SyncRequest.Builder setRequiresCharging(boolean); method public android.content.SyncRequest.Builder setSyncAdapter(android.accounts.Account, java.lang.String); method public android.content.SyncRequest.Builder syncOnce(); method public android.content.SyncRequest.Builder syncPeriodic(long, long);
core/java/android/content/ContentResolver.java +7 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,13 @@ public abstract class ContentResolver { */ public static final String SYNC_EXTRAS_EXPEDITED = "expedited"; /** * If this extra is set to true, the sync request will be scheduled * only when the device is plugged in. This is equivalent to calling * setRequiresCharging(true) on {@link SyncRequest}. */ public static final String SYNC_EXTRAS_REQUIRE_CHARGING = "require_charging"; /** * @deprecated instead use * {@link #SYNC_EXTRAS_MANUAL} Loading
core/java/android/content/SyncRequest.java +17 −1 Original line number Diff line number Diff line Loading @@ -246,6 +246,10 @@ public class SyncRequest implements Parcelable { * this sync is bound to a provider), otherwise null. */ private String mAuthority; /** * Whether the sync requires the phone to be plugged in. */ private boolean mRequiresCharging; public Builder() { } Loading Loading @@ -341,6 +345,15 @@ public class SyncRequest implements Parcelable { return this; } /** * Specify whether the sync requires the phone to be plugged in. * @param requiresCharging true if sync requires the phone to be plugged in. Default false. */ public Builder setRequiresCharging(boolean requiresCharging) { mRequiresCharging = true; return this; } /** * Specify an authority and account for this transfer. * Loading Loading @@ -499,6 +512,9 @@ public class SyncRequest implements Parcelable { if (mDisallowMetered) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_DISALLOW_METERED, true); } if (mRequiresCharging) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_REQUIRE_CHARGING, true); } if (mIgnoreSettings) { mSyncConfigExtras.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true); } Loading