summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/content/ContentService.java
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2013-08-20 15:32:20 -0700
committerMatthew Williams <mjwilliams@google.com>2013-08-30 21:28:53 +0000
commit6222288bfbae46550b4914ef1eb12c69dc1f716c (patch)
treeaaba6a3c0cf4ad8fee6b6e19522520dcf8b01ae6 /services/java/com/android/server/content/ContentService.java
parent4b2993123bf9a1c56d0a16b032612834dd418520 (diff)
DO NOT MERGE. Remove service component for KLP.
1) As discussed, lack of internal clients -> remove SyncService component from KLP. This CL reverts that addition. 2) Also includes javadoc cleanup of existing API. 3) Fix naming of allowMetered() -> disallowMetered() in API 4) Removed one-off sync in the future, as it doesn't make sense for sync adapters. Change-Id: I1b17094e6edafb2955cdfb99f39b44274fbe86f9
Diffstat (limited to 'services/java/com/android/server/content/ContentService.java')
-rw-r--r--services/java/com/android/server/content/ContentService.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/services/java/com/android/server/content/ContentService.java b/services/java/com/android/server/content/ContentService.java
index a56af08a3da8..7c82821bce52 100644
--- a/services/java/com/android/server/content/ContentService.java
+++ b/services/java/com/android/server/content/ContentService.java
@@ -19,7 +19,6 @@ package com.android.server.content;
import android.Manifest;
import android.accounts.Account;
import android.app.ActivityManager;
-import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.IContentService;
@@ -363,8 +362,8 @@ public final class ContentService extends IContentService.Stub {
if (syncManager != null) {
if (request.hasAuthority()) {
// Sync Adapter registered with the system - old API.
- final Account account = request.getProviderInfo().first;
- final String provider = request.getProviderInfo().second;
+ final Account account = request.getAccount();
+ final String provider = request.getProvider();
if (request.isPeriodic()) {
mContext.enforceCallingOrSelfPermission(
Manifest.permission.WRITE_SYNC_SETTINGS,
@@ -386,20 +385,7 @@ public final class ContentService extends IContentService.Stub {
false /* onlyThoseWithUnknownSyncableState */);
}
} else {
- // Anonymous sync - new API.
- final ComponentName syncService = request.getService();
- if (request.isPeriodic()) {
- throw new RuntimeException("Periodic anonymous syncs not implemented yet.");
- } else {
- long beforeRuntimeMillis = (flextime) * 1000;
- long runtimeMillis = runAtTime * 1000;
- syncManager.scheduleSync(
- syncService, userId, uId, extras,
- beforeRuntimeMillis,
- runtimeMillis,
- false /* onlyThoseWithUnknownSyncableState */); // Empty function.
- throw new RuntimeException("One-off anonymous syncs not implemented yet.");
- }
+ Log.w(TAG, "Unrecognised sync parameters, doing nothing.");
}
}
} finally {