diff options
author | Fred Quintana <fredq@google.com> | 2009-12-10 10:33:18 -0800 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-12-10 11:16:18 -0800 |
commit | 97ef7637c6799e72956db8e08192539f1b1942f6 (patch) | |
tree | 329a8706e0c85a76c3d7bdd3830376f4f16f6395 | |
parent | b3c1f1cff4ecf5c88a0bd00d421beeb022bb41e4 (diff) | |
download | frameworks_base-97ef7637c6799e72956db8e08192539f1b1942f6.zip frameworks_base-97ef7637c6799e72956db8e08192539f1b1942f6.tar.gz frameworks_base-97ef7637c6799e72956db8e08192539f1b1942f6.tar.bz2 |
- move the EventLog stuff out of ATSA
- move the google calendar sync adapter settings out of Settings.java
-rw-r--r-- | core/java/android/content/AbstractThreadedSyncAdapter.java | 30 | ||||
-rw-r--r-- | core/java/android/provider/Settings.java | 53 |
2 files changed, 6 insertions, 77 deletions
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java index 091d44e..154c4a6 100644 --- a/core/java/android/content/AbstractThreadedSyncAdapter.java +++ b/core/java/android/content/AbstractThreadedSyncAdapter.java @@ -37,6 +37,12 @@ import java.util.concurrent.atomic.AtomicInteger; * that the sync has been canceled. */ public abstract class AbstractThreadedSyncAdapter { + /** + * Kernel event log tag. Also listed in data/etc/event-log-tags. + * @Deprecated + */ + public static final int LOG_SYNC_DETAILS = 2743; + private final Context mContext; private final AtomicInteger mNumSyncStarts; private final ISyncAdapterImpl mISyncAdapterImpl; @@ -45,9 +51,6 @@ public abstract class AbstractThreadedSyncAdapter { private SyncThread mSyncThread; private final Object mSyncThreadLock = new Object(); - /** Kernel event log tag. Also listed in data/etc/event-log-tags. */ - public static final int LOG_SYNC_DETAILS = 2743; - private static final String TAG = "Sync"; private final boolean mAutoInitialize; /** @@ -136,8 +139,6 @@ public abstract class AbstractThreadedSyncAdapter { private final String mAuthority; private final Account mAccount; private final Bundle mExtras; - private long mInitialTxBytes; - private long mInitialRxBytes; private SyncThread(String name, SyncContext syncContext, String authority, Account account, Bundle extras) { @@ -156,9 +157,6 @@ public abstract class AbstractThreadedSyncAdapter { } SyncResult syncResult = new SyncResult(); - int uid = Process.myUid(); - mInitialTxBytes = TrafficStats.getUidTxBytes(uid); - mInitialRxBytes = TrafficStats.getUidRxBytes(uid); ContentProviderClient provider = null; try { provider = mContext.getContentResolver().acquireContentProviderClient(mAuthority); @@ -175,8 +173,6 @@ public abstract class AbstractThreadedSyncAdapter { if (!isCanceled()) { mSyncContext.onFinished(syncResult); } - onLogSyncDetails(TrafficStats.getUidTxBytes(uid) - mInitialTxBytes, - TrafficStats.getUidRxBytes(uid) - mInitialRxBytes, syncResult); // synchronize so that the assignment will be seen by other threads // that also synchronize accesses to mSyncThread synchronized (mSyncThreadLock) { @@ -211,18 +207,4 @@ public abstract class AbstractThreadedSyncAdapter { */ public abstract void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult); - - /** - * Logs details on the sync. - * Normally this will be overridden by a subclass that will provide - * provider-specific details. - * - * @param bytesSent number of bytes the sync sent over the network - * @param bytesReceived number of bytes the sync received over the network - * @param result The SyncResult object holding info on the sync - * @hide - */ - protected void onLogSyncDetails(long bytesSent, long bytesReceived, SyncResult result) { - EventLog.writeEvent(SyncAdapter.LOG_SYNC_DETAILS, TAG, bytesSent, bytesReceived, ""); - } } diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index ec0fe38..8c83303 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3586,59 +3586,6 @@ public final class Settings { public static final String USE_LOCATION_FOR_SERVICES = "use_location"; /** - * The number of entries to fetch from the feed at a time for calendar sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_ENTRY_FETCH_QUEUE_SIZE = - "google_calendar_sync_entry_fetch_queue_size"; - - /** - * The number of entities to fetch from the provider at a time for calendar sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_ENTITY_FETCH_QUEUE_SIZE = - "google_calendar_sync_entity_fetch_queue_size"; - - /** - * The maximum number of simultaneous changes to allow before alerting the user for - * calendar sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_NUM_ALLOWED_SIMULTANEOUS_CHANGES = - "google_calendar_sync_num_allowed_simultaneous changes"; - - /** - * The maximum percentage of simultaneous changes to allow before alerting the user for - * calendar sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_PERCENT_ALLOWED_SIMULTANEOUS_CHANGES = - "google_calendar_sync_percent_allowed_simultaneous_changes"; - - /** - * The number of times to apply local changes in calendar sync before stopping. - */ - public static final String GOOGLE_CALENDAR_SYNC_MAX_LOOP_ATTEMPTS = - "google_calendar_sync_max_loop_attempts"; - - /** - * The batch size for applying server changes to the provider for calendar sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_NUM_APPLICATIONS_PER_BATCH = - "google_calendar_sync_num_applications_per_batch"; - - /** - * The length of the calendar sync window into the future. - * This specifies the number of days into the future for the sliding window sync. - * Setting this to zero will disable sliding sync. - */ - public static final String GOOGLE_CALENDAR_SYNC_WINDOW_DAYS = - "google_calendar_sync_window_days"; - - /** - * How often to update the calendar sync window. - * The window will be advanced every n days. - */ - public static final String GOOGLE_CALENDAR_SYNC_WINDOW_UPDATE_DAYS = - "google_calendar_sync_window_update_days"; - - /** * The number of promoted sources in GlobalSearch. */ public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; |