1
0
mirror of https://github.com/etesync/android synced 2025-02-23 13:02:04 +00:00

Rename DavService service.

This commit is contained in:
Tom Hacohen 2017-02-13 16:45:45 +00:00
parent 1b3cd631bc
commit 2583f75d41
23 changed files with 29 additions and 31 deletions

View File

@ -112,7 +112,7 @@
<service
android:name=".DavService"
android:name=".AccountUpdateService"
android:enabled="true">
</service>

View File

@ -30,11 +30,10 @@ import java.util.Set;
import at.bitfire.davdroid.model.ServiceDB.OpenHelper;
import at.bitfire.davdroid.model.ServiceDB.Services;
public class DavService extends Service {
public class AccountUpdateService extends Service {
public static final String
ACTION_ACCOUNTS_UPDATED = "accountsUpdated",
EXTRA_DAV_SERVICE_ID = "davServiceID";
ACTION_ACCOUNTS_UPDATED = "accountsUpdated";
private final IBinder binder = new InfoBinder();
@ -46,7 +45,6 @@ public class DavService extends Service {
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null) {
String action = intent.getAction();
long id = intent.getLongExtra(EXTRA_DAV_SERVICE_ID, -1);
switch (action) {
case ACTION_ACCOUNTS_UPDATED:

View File

@ -24,8 +24,8 @@ public class AccountsChangedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION.equals(intent.getAction())) {
Intent serviceIntent = new Intent(context, DavService.class);
serviceIntent.setAction(DavService.ACTION_ACCOUNTS_UPDATED);
Intent serviceIntent = new Intent(context, AccountUpdateService.class);
serviceIntent.setAction(AccountUpdateService.ACTION_ACCOUNTS_UPDATED);
context.startService(serviceIntent);
for (OnAccountsUpdateListener listener : listeners)

View File

@ -61,8 +61,8 @@ import java.util.List;
import java.util.logging.Level;
import at.bitfire.cert4android.CustomCertManager;
import at.bitfire.davdroid.AccountUpdateService;
import at.bitfire.davdroid.App;
import at.bitfire.davdroid.DavService;
import at.bitfire.davdroid.R;
import at.bitfire.davdroid.model.CollectionInfo;
import at.bitfire.davdroid.model.ServiceDB.Collections;
@ -319,9 +319,9 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
}
private static class AccountLoader extends AsyncTaskLoader<AccountInfo> implements DavService.RefreshingStatusListener, ServiceConnection, SyncStatusObserver {
private static class AccountLoader extends AsyncTaskLoader<AccountInfo> implements AccountUpdateService.RefreshingStatusListener, ServiceConnection, SyncStatusObserver {
private final Account account;
private DavService.InfoBinder davService;
private AccountUpdateService.InfoBinder davService;
private Object syncStatusListener;
public AccountLoader(Context context, Account account) {
@ -333,7 +333,7 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
protected void onStartLoading() {
syncStatusListener = ContentResolver.addStatusChangeListener(SYNC_OBSERVER_TYPE_ACTIVE, this);
getContext().bindService(new Intent(getContext(), DavService.class), this, Context.BIND_AUTO_CREATE);
getContext().bindService(new Intent(getContext(), AccountUpdateService.class), this, Context.BIND_AUTO_CREATE);
}
@Override
@ -347,7 +347,7 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
davService = (DavService.InfoBinder)service;
davService = (AccountUpdateService.InfoBinder)service;
davService.addRefreshingStatusListener(this, false);
forceLoad();

View File

@ -7,7 +7,7 @@
<!--AboutActivity-->
<!--global settings-->
<!--AccountsActivity-->
<!--DavService-->
<!--AccountUpdateService-->
<!--AppSettingsActivity-->
<!--AccountActivity-->
<!--PermissionsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Komunita</string>
<string name="navigation_drawer_donate">Obdarovat</string>
<string name="account_list_empty">Vítejte v aplikaci DAVdroid!\n\nNyní můžete přidat CalDAV/CardDAV účet.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Vyhledání služby selhalo</string>
<string name="dav_service_refresh_couldnt_refresh">Nelze obnovit seznam sbírky</string>
<!--AppSettingsActivity-->

View File

@ -44,7 +44,7 @@
<string name="navigation_drawer_forums">Community</string>
<string name="navigation_drawer_donate">Donation</string>
<string name="account_list_empty">Velkommen til DAVdroid!\n\nDu kan nu tilføje en CaDAV/CardDAV-konto.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Registrering af tjeneste kunne ikke foretages</string>
<string name="dav_service_refresh_couldnt_refresh">Kunne opdatere liste over sæt</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Community</string>
<string name="navigation_drawer_donate">Spenden</string>
<string name="account_list_empty">Herzlich willkommen!\n\nSie können jetzt ein CalDAV/CardDAV-Konto hinzufügen.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Diensterkennung fehlgeschlagen</string>
<string name="dav_service_refresh_couldnt_refresh">Ordnerliste konnte nicht aktualisiert werden</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Comunidad</string>
<string name="navigation_drawer_donate">Donar</string>
<string name="account_list_empty">Bienvenido a DAVdroid!\n\nAhora puedes añadir una cuenta CalDAV/CardDAV.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Falló la detección del servicio</string>
<string name="dav_service_refresh_couldnt_refresh">No se pudo refrescar lista de colección</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Communauté</string>
<string name="navigation_drawer_donate">Faire un don</string>
<string name="account_list_empty">Bienvenue sur DAVdroid!\n\nVous pouvez maintenant ajouter un compte CalDAV/CardDAV.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">La détection du service a échoué</string>
<string name="dav_service_refresh_couldnt_refresh">Impossible d\'actualiser la liste de collection</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Közösség</string>
<string name="navigation_drawer_donate">Támogatás</string>
<string name="account_list_empty">Üdvözöljük a DAVdroid felhasználók között!\n\nMost már felvehet CalDAV/CardDav fiókokat.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Szolgáltatások felderítése nem sikerült</string>
<string name="dav_service_refresh_couldnt_refresh">Gyűjteménylista frissítése nem sikerült</string>
<!--AppSettingsActivity-->

View File

@ -45,7 +45,7 @@
<string name="navigation_drawer_forums">Comunità</string>
<string name="navigation_drawer_donate">Donazione</string>
<string name="account_list_empty">Benvenuto a DAVdroid!\n\nÈ ora possibile aggiungere account CalDAV/CardDAV.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Fallita l\'individuazione dei servizi</string>
<string name="dav_service_refresh_couldnt_refresh">Impossibile rinnovare la lista delle collezioni</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">コミュニティ</string>
<string name="navigation_drawer_donate">寄付</string>
<string name="account_list_empty">DAVdroid にようこそ!\n\nCalDAV/CardDAV アカウントを追加できるようになりました。</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">サービスの検出に失敗しました</string>
<string name="dav_service_refresh_couldnt_refresh">コレクション リストを更新できません</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Community</string>
<string name="navigation_drawer_donate">Doneren</string>
<string name="account_list_empty">Welkom bij DAVdroid!\n\nJe kunt nu een CalDAV/CardDAv account toevoegen.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Service herkenning is mislukt</string>
<string name="dav_service_refresh_couldnt_refresh">Kon de collectie lijst niet vernieuwen</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Społeczność</string>
<string name="navigation_drawer_donate">Dotacja</string>
<string name="account_list_empty">Witamy w DAVdroid!\n\nMożesz teraz dodać konto CalDAV/CardDAV.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Wykrycie serwisu nie powiodło się</string>
<string name="dav_service_refresh_couldnt_refresh">Nie można odświeżyć listy kolekcji</string>
<!--AppSettingsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Comunidade</string>
<string name="navigation_drawer_donate">Doações</string>
<string name="account_list_empty">Bem-vindo ao DAVdroid!\n\nVocê pode adicionar uma conta CalDAV/CardDAV agora.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Falha na detecção do serviço</string>
<string name="dav_service_refresh_couldnt_refresh">Não foi possível atualizar a lista da coleção</string>
<!--AppSettingsActivity-->

View File

@ -7,7 +7,7 @@
<!--AboutActivity-->
<!--global settings-->
<!--AccountsActivity-->
<!--DavService-->
<!--AccountUpdateService-->
<!--AppSettingsActivity-->
<!--AccountActivity-->
<!--PermissionsActivity-->

View File

@ -8,7 +8,7 @@
<!--AboutActivity-->
<!--global settings-->
<!--AccountsActivity-->
<!--DavService-->
<!--AccountUpdateService-->
<!--AppSettingsActivity-->
<!--AccountActivity-->
<!--PermissionsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">Заједница</string>
<string name="navigation_drawer_donate">Донирај</string>
<string name="account_list_empty">Добро дошли у ДАВдроид!\n\nМожете сада да додате КалДАВ/КардДАВ налог.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Откривање услуге није успело</string>
<string name="dav_service_refresh_couldnt_refresh">Не могох да освежим списак збирки</string>
<!--AppSettingsActivity-->

View File

@ -44,7 +44,7 @@
<string name="navigation_drawer_forums">Camia</string>
<string name="navigation_drawer_donate">Bağış yap</string>
<string name="account_list_empty">DAVdroid\'e hoşgeldin!\n\nŞimdi bir CalDAV/CardDAV hesabı ekleyebilirsin.</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">Servis keşfi başarısız</string>
<string name="dav_service_refresh_couldnt_refresh">Kolleksiyon listesi yenilenemedi</string>
<!--AppSettingsActivity-->

View File

@ -7,7 +7,7 @@
<!--AboutActivity-->
<!--global settings-->
<!--AccountsActivity-->
<!--DavService-->
<!--AccountUpdateService-->
<!--AppSettingsActivity-->
<!--AccountActivity-->
<!--PermissionsActivity-->

View File

@ -47,7 +47,7 @@
<string name="navigation_drawer_forums">社区</string>
<string name="navigation_drawer_donate">捐助</string>
<string name="account_list_empty">欢迎使用 DAVdroid\n\n现在你可以增加 CalDAV/CardDAV 账户。</string>
<!--DavService-->
<!--AccountUpdateService-->
<string name="dav_service_refresh_failed">服务配置检测失败</string>
<string name="dav_service_refresh_couldnt_refresh">无法刷新集合列表</string>
<!--AppSettingsActivity-->

View File

@ -64,7 +64,7 @@
<string name="account_list_empty">Welcome to EteSync!\n\nAdd an account to start.</string>
<!-- DavService -->
<!-- AccountUpdateService -->
<string name="dav_service_refresh_failed">Service detection failed</string>
<string name="dav_service_refresh_couldnt_refresh">Couldn\'t refresh collection list</string>