OLD | NEW |
| (Empty) |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 package org.chromium.sync; | |
6 | |
7 | |
8 import android.accounts.Account; | |
9 import android.content.ContentResolver; | |
10 import android.content.SyncStatusObserver; | |
11 import android.os.Bundle; | |
12 | |
13 /** | |
14 * A SyncContentResolverDelegate that simply forwards calls to ContentResolver. | |
15 */ | |
16 public class SystemSyncContentResolverDelegate implements SyncContentResolverDel
egate { | |
17 | |
18 @Override | |
19 public Object addStatusChangeListener(int mask, SyncStatusObserver callback)
{ | |
20 return ContentResolver.addStatusChangeListener(mask, callback); | |
21 } | |
22 | |
23 @Override | |
24 public void removeStatusChangeListener(Object handle) { | |
25 ContentResolver.removeStatusChangeListener(handle); | |
26 } | |
27 | |
28 @Override | |
29 public void setMasterSyncAutomatically(boolean sync) { | |
30 ContentResolver.setMasterSyncAutomatically(sync); | |
31 } | |
32 | |
33 @Override | |
34 public boolean getMasterSyncAutomatically() { | |
35 return ContentResolver.getMasterSyncAutomatically(); | |
36 } | |
37 | |
38 @Override | |
39 public boolean getSyncAutomatically(Account account, String authority) { | |
40 return ContentResolver.getSyncAutomatically(account, authority); | |
41 } | |
42 | |
43 @Override | |
44 public void setSyncAutomatically(Account account, String authority, boolean
sync) { | |
45 ContentResolver.setSyncAutomatically(account, authority, sync); | |
46 } | |
47 | |
48 @Override | |
49 public void setIsSyncable(Account account, String authority, int syncable) { | |
50 ContentResolver.setIsSyncable(account, authority, syncable); | |
51 } | |
52 | |
53 @Override | |
54 public int getIsSyncable(Account account, String authority) { | |
55 return ContentResolver.getIsSyncable(account, authority); | |
56 } | |
57 | |
58 @Override | |
59 public void removePeriodicSync(Account account, String authority, Bundle ext
ras) { | |
60 ContentResolver.removePeriodicSync(account, authority, extras); | |
61 } | |
62 } | |
OLD | NEW |