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 5package org.chromium.sync.notifier; 6 7 8import android.accounts.Account; 9import android.content.SyncStatusObserver; 10 11/** 12 * Since the ContentResolver in Android has a lot of static methods, it is hard to 13 * mock out for tests. This interface wraps all the sync-related methods we use from 14 * the Android ContentResolver. 15 */ 16public interface SyncContentResolverDelegate { 17 18 Object addStatusChangeListener(int mask, SyncStatusObserver callback); 19 20 void removeStatusChangeListener(Object handle); 21 22 void setMasterSyncAutomatically(boolean sync); 23 24 boolean getMasterSyncAutomatically(); 25 26 void setSyncAutomatically(Account account, String authority, boolean sync); 27 28 boolean getSyncAutomatically(Account account, String authority); 29 30 void setIsSyncable(Account account, String authority, int syncable); 31 32 int getIsSyncable(Account account, String authority); 33} 34