drop ContactSync feature

This commit is contained in:
Vincent Breitmoser 2020-09-05 14:32:59 +02:00
parent aa6ff03545
commit 2d9edf3832
39 changed files with 23 additions and 624 deletions

View file

@ -54,21 +54,6 @@
<!-- CAMERA permission requested by ZXing library -->
<!-- contact group -->
<!--
AUTHENTICATE_ACCOUNTS and MANAGE_ACCOUNTS removed in Android >= 6,
see https://code.google.com/p/android-developer-preview/issues/detail?id=2592
also READ_PROFILE, WRITE_PROFILE?
-->
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.WRITE_PROFILE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<!-- storage group -->
<!--
No need on >= Android 4.4 for WRITE_EXTERNAL_STORAGE, because we use Storage Access Framework,
@ -1012,36 +997,6 @@
</intent-filter>
</service>
<!-- Contact Sync services -->
<service
android:name=".service.DummyAccountService"
android:exported="true"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/account_desc" />
</service>
<service
android:name=".service.ContactSyncAdapterService"
android:exported="true"
android:process=":sync"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/sync_adapter_contacts" />
<meta-data
android:name="android.provider.CONTACTS_STRUCTURE"
android:resource="@xml/sync_adapter_contacts_structure" />
</service>
<!-- Storage Provider for temporary decrypted files.
For security considerations, read class! -->
<provider

View file

@ -30,6 +30,8 @@ import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.widget.Toast;
import androidx.annotation.Nullable;
@ -37,7 +39,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.sufficientlysecure.keychain.keysync.KeyserverSyncManager;
import org.sufficientlysecure.keychain.network.TlsCertificatePinning;
import org.sufficientlysecure.keychain.provider.TemporaryFileProvider;
import org.sufficientlysecure.keychain.service.ContactSyncAdapterService;
import org.sufficientlysecure.keychain.util.PRNGFixes;
import org.sufficientlysecure.keychain.util.Preferences;
import timber.log.Timber;
@ -85,15 +86,9 @@ public class KeychainApplication extends Application {
}
*/
// Add OpenKeychain account to Android to link contacts with keys and keyserver sync
createAccountIfNecessary(this);
Preferences preferences = Preferences.getPreferences(this);
if (preferences.isAppExecutedFirstTime()) {
preferences.setAppExecutedFirstTime(false);
ContactSyncAdapterService.enableContactsSync(this);
preferences.setPrefVersionToCurrentVersion();
}
@ -115,33 +110,6 @@ public class KeychainApplication extends Application {
TemporaryFileProvider.scheduleCleanupImmediately(getApplicationContext());
}
/**
* @return the OpenKeychain contact/keyserver sync account if it exists or was successfully
* created, null otherwise
*/
public static @Nullable Account createAccountIfNecessary(Context context) {
try {
AccountManager manager = AccountManager.get(context);
Account[] accounts = manager.getAccountsByType(Constants.ACCOUNT_TYPE);
Account account = new Account(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE);
if (accounts.length == 0) {
if (!manager.addAccountExplicitly(account, null, null)) {
Timber.d("error when adding account via addAccountExplicitly");
return null;
} else {
return account;
}
} else {
return accounts[0];
}
} catch (SecurityException e) {
Timber.e(e, "SecurityException when adding the account");
Toast.makeText(context, R.string.reinstall_openkeychain, Toast.LENGTH_LONG).show();
return null;
}
}
public static HashMap<String,Bitmap> qrCodeCache = new HashMap<>();
@Override

View file

@ -43,7 +43,6 @@ import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
import org.sufficientlysecure.keychain.service.CertifyActionsParcel;
import org.sufficientlysecure.keychain.service.CertifyActionsParcel.CertifyAction;
import org.sufficientlysecure.keychain.service.ContactSyncAdapterService;
import org.sufficientlysecure.keychain.service.UploadKeyringParcel;
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
@ -254,9 +253,6 @@ public class CertifyOperation extends BaseReadWriteOperation<CertifyActionsParce
uploadOk, uploadError);
}
// since only verified keys are synced to contacts, we need to initiate a sync now
ContactSyncAdapterService.requestContactsSync();
log.add(LogType.MSG_CRT_SUCCESS, 0);
if (uploadError != 0) {
return new CertifyResult(CertifyResult.RESULT_WARNINGS, log, certifyOk, certifyError, uploadOk,

View file

@ -30,7 +30,6 @@ import org.sufficientlysecure.keychain.operations.results.OperationResult.Operat
import org.sufficientlysecure.keychain.operations.results.UpdateTrustResult;
import org.sufficientlysecure.keychain.pgp.Progressable;
import org.sufficientlysecure.keychain.daos.KeyWritableRepository;
import org.sufficientlysecure.keychain.service.ContactSyncAdapterService;
import org.sufficientlysecure.keychain.service.DeleteKeyringParcel;
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
@ -101,9 +100,6 @@ public class DeleteOperation extends BaseReadWriteOperation<DeleteKeyringParcel>
int result = DeleteResult.RESULT_OK;
if (success > 0) {
// make sure new data is synced into contacts
ContactSyncAdapterService.requestContactsSync();
log.add(LogType.MSG_DEL_OK, 0, success);
}
if (fail > 0) {

View file

@ -38,7 +38,6 @@ import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKeyRing;
import org.sufficientlysecure.keychain.pgp.PgpKeyOperation;
import org.sufficientlysecure.keychain.pgp.Progressable;
import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
import org.sufficientlysecure.keychain.service.ContactSyncAdapterService;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel;
import org.sufficientlysecure.keychain.service.UploadKeyringParcel;
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
@ -182,9 +181,6 @@ public class EditKeyOperation extends BaseReadWriteOperation<SaveKeyringParcel>
updateProgress(R.string.progress_done, 100, 100);
// make sure new data is synced into contacts
ContactSyncAdapterService.requestContactsSync();
log.add(LogType.MSG_ED_SUCCESS, 0);
return new EditKeyResult(EditKeyResult.RESULT_OK, log, ring.getMasterKeyId());

View file

@ -32,9 +32,9 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.daos.KeyMetadataDao;
import org.sufficientlysecure.keychain.daos.KeyWritableRepository;
@ -55,7 +55,6 @@ import org.sufficientlysecure.keychain.pgp.CanonicalizedKeyRing;
import org.sufficientlysecure.keychain.pgp.Progressable;
import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
import org.sufficientlysecure.keychain.service.ContactSyncAdapterService;
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
@ -134,9 +133,6 @@ public class ImportOperation extends BaseReadWriteOperation<ImportKeyringParcel>
}
/**
* Since the introduction of multithreaded import, we expect calling functions to handle the
* contact-to-key sync i.e ContactSyncAdapterService.requestContactsSync()
*
* @param entries keys to import
* @param numTotalKeys number of keys to import
* @param hkpKeyserver contains uri of keyserver to import from, if it is an import from cloud
@ -274,11 +270,6 @@ public class ImportOperation extends BaseReadWriteOperation<ImportKeyringParcel>
}
}
// Special: make sure new data is synced into contacts
// disabling sync right now since it reduces speed while multi-threading
// so, we expect calling functions to take care of it. KeychainService handles this
// ContactSyncAdapterService.requestContactsSync();
// convert to long array
long[] importedMasterKeyIdsArray = new long[importedMasterKeyIds.size()];
for (int i = 0; i < importedMasterKeyIds.size(); ++i) {
@ -476,10 +467,6 @@ public class ImportOperation extends BaseReadWriteOperation<ImportKeyringParcel>
result = multiThreadedKeyImport(keyList, keyServer, proxy, skipSave, forceReinsert);
}
if (!skipSave) {
ContactSyncAdapterService.requestContactsSync();
}
return result;
}

View file

@ -1,177 +0,0 @@
/*
* Copyright (C) 2017 Schürmann & Breitmoser GbR
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.sufficientlysecure.keychain.service;
import android.accounts.Account;
import android.app.PendingIntent;
import android.app.Service;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.SyncResult;
import android.os.Bundle;
import android.os.IBinder;
import android.preference.PreferenceActivity;
import android.provider.ContactsContract;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.KeychainApplication;
import org.sufficientlysecure.keychain.NotificationChannelManager;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.ui.SettingsActivity;
import org.sufficientlysecure.keychain.util.ContactHelper;
import timber.log.Timber;
public class ContactSyncAdapterService extends Service {
private static final int NOTIFICATION_ID_SYNC_SETTINGS = 13;
private class ContactSyncAdapter extends AbstractThreadedSyncAdapter {
// private final AtomicBoolean importDone = new AtomicBoolean(false);
public ContactSyncAdapter() {
super(ContactSyncAdapterService.this, true);
}
@Override
public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider,
final SyncResult syncResult) {
Timber.d("Performing a contact sync!");
new ContactHelper(ContactSyncAdapterService.this).writeKeysToContacts();
// importKeys();
}
@Override
public void onSecurityException(Account account, Bundle extras, String authority, SyncResult syncResult) {
super.onSecurityException(account, extras, authority, syncResult);
// deactivate sync
ContentResolver.setSyncAutomatically(account, authority, false);
NotificationChannelManager.getInstance(getContext()).createNotificationChannelsIfNecessary();
// show notification linking to sync settings
Intent resultIntent = new Intent(ContactSyncAdapterService.this, SettingsActivity.class);
resultIntent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT,
SettingsActivity.SyncPrefsFragment.class.getName());
PendingIntent resultPendingIntent =
PendingIntent.getActivity(
ContactSyncAdapterService.this,
0,
resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT
);
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(ContactSyncAdapterService.this, NotificationChannelManager.PERMISSION_REQUESTS)
.setAutoCancel(true)
.setSmallIcon(R.drawable.ic_stat_notify_24dp)
.setColor(getResources().getColor(R.color.primary))
.setContentTitle(getString(R.string.sync_notification_permission_required_title))
.setContentText(getString(R.string.sync_notification_permission_required_text))
.setContentIntent(resultPendingIntent);
NotificationManagerCompat.from(ContactSyncAdapterService.this)
.notify(NOTIFICATION_ID_SYNC_SETTINGS, mBuilder.build());
}
}
@Override
public IBinder onBind(Intent intent) {
return new ContactSyncAdapter().getSyncAdapterBinder();
}
public static void requestContactsSync() {
// if user has disabled automatic sync, do nothing
boolean isSyncEnabled = ContentResolver.getSyncAutomatically(new Account
(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE), ContactsContract.AUTHORITY);
if (!isSyncEnabled) {
return;
}
Bundle extras = new Bundle();
// no need to wait, do it immediately
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
ContentResolver.requestSync(
new Account(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE),
ContactsContract.AUTHORITY,
extras);
}
public static void enableContactsSync(Context context) {
Account account = KeychainApplication.createAccountIfNecessary(context);
if (account == null) {
return;
}
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1);
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
}
// TODO: Import is currently disabled, until we implement proper origin management
// private static void importKeys() {
// importDone.set(false);
// KeychainApplication.setupAccountAsNeeded(ContactSyncAdapterService.this);
// EmailKeyHelper.importContacts(getContext(), new Messenger(new Handler(Looper.getMainLooper(),
// new Handler.Callback() {
// @Override
// public boolean handleMessage(Message msg) {
// Bundle data = msg.getInputData();
// switch (msg.arg1) {
// case KeychainIntentServiceHandler.MESSAGE_OKAY:
// Log.d(Constants.TAG, "Syncing... Done.");
// synchronized (importDone) {
// importDone.set(true);
// importDone.notifyAll();
// }
// return true;
// case KeychainIntentServiceHandler.MESSAGE_UPDATE_PROGRESS:
// if (data.containsKey(KeychainIntentServiceHandler.DATA_PROGRESS) &&
// data.containsKey(KeychainIntentServiceHandler.DATA_PROGRESS_MAX)) {
// Log.d(Constants.TAG, "Syncing... Progress: " +
// data.getInt(KeychainIntentServiceHandler.DATA_PROGRESS) + "/" +
// data.getInt(KeychainIntentServiceHandler.DATA_PROGRESS_MAX));
// return false;
// }
// default:
// Log.d(Constants.TAG, "Syncing... " + msg.toString());
// return false;
// }
// }
// })));
// synchronized (importDone) {
// try {
// if (!importDone.get()) importDone.wait();
// } catch (InterruptedException e) {
// Log.w(Constants.TAG, e);
// return;
// }
// }
// }
}

View file

@ -1,133 +0,0 @@
/*
* Copyright (C) 2017 Schürmann & Breitmoser GbR
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.sufficientlysecure.keychain.service;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.NetworkErrorException;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.widget.Toast;
import org.sufficientlysecure.keychain.R;
import timber.log.Timber;
/**
* This service actually does nothing, it's sole task is to show a Toast if the use tries to create an account.
*/
public class DummyAccountService extends Service {
private class Toaster {
private static final String TOAST_MESSAGE = "toast_message";
private Context context;
private Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
Toast.makeText(context, msg.getData().getString(TOAST_MESSAGE), Toast.LENGTH_LONG).show();
return true;
}
});
private Toaster(Context context) {
this.context = context;
}
public void toast(int resourceId) {
toast(context.getString(resourceId));
}
public void toast(String message) {
Message msg = new Message();
Bundle bundle = new Bundle();
bundle.putString(TOAST_MESSAGE, message);
msg.setData(bundle);
handler.sendMessage(msg);
}
}
private class Authenticator extends AbstractAccountAuthenticator {
public Authenticator() {
super(DummyAccountService.this);
}
@Override
public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) {
Timber.d("DummyAccountService.editProperties");
return null;
}
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
String[] requiredFeatures, Bundle options) throws NetworkErrorException {
response.onResult(new Bundle());
toaster.toast(R.string.account_no_manual_account_creation);
Timber.d("DummyAccountService.addAccount");
return null;
}
@Override
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options)
throws NetworkErrorException {
Timber.d("DummyAccountService.confirmCredentials");
return null;
}
@Override
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType,
Bundle options) throws NetworkErrorException {
Timber.d("DummyAccountService.getAuthToken");
return null;
}
@Override
public String getAuthTokenLabel(String authTokenType) {
Timber.d("DummyAccountService.getAuthTokenLabel");
return null;
}
@Override
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType,
Bundle options) throws NetworkErrorException {
Timber.d("DummyAccountService.updateCredentials");
return null;
}
@Override
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features)
throws NetworkErrorException {
Timber.d("DummyAccountService.hasFeatures");
return null;
}
}
private Toaster toaster;
@Override
public IBinder onBind(Intent intent) {
toaster = new Toaster(this);
return new Authenticator().getIBinder();
}
}

View file

@ -23,16 +23,9 @@ import java.security.KeyStoreException;
import java.util.ArrayList;
import java.util.List;
import android.Manifest;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
@ -40,17 +33,13 @@ import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.preference.SwitchPreference;
import android.provider.ContactsContract;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.KeychainApplication;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.compatibility.AppCompatPreferenceActivity;
import org.sufficientlysecure.keychain.keyimport.HkpKeyserverAddress;
@ -402,11 +391,8 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.sync_preferences);
findPreference(Constants.Pref.SYNC_KEYSERVER).setOnPreferenceChangeListener(
(preference, newValue) -> {
return true;
});
(preference, newValue) -> true);
}
@Override
@ -414,130 +400,6 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
super.onStop();
KeyserverSyncManager.updateKeyserverSyncScheduleAsync(getActivity(), true);
}
@Override
public void onResume() {
super.onResume();
// this needs to be done in onResume since the user can change sync values from Android
// settings and we need to reflect that change when the user navigates back
final Account account = KeychainApplication.createAccountIfNecessary(getActivity());
// for contacts sync
initializeSyncCheckBox(
(SwitchPreference) findPreference(Constants.Pref.SYNC_CONTACTS),
account,
ContactsContract.AUTHORITY
);
}
private void initializeSyncCheckBox(final SwitchPreference syncCheckBox,
final Account account,
final String authority) {
// account is null if it could not be created for some reason
boolean syncEnabled =
account != null
&& ContentResolver.getSyncAutomatically(account, authority)
&& checkContactsPermission(authority);
syncCheckBox.setChecked(syncEnabled);
setSummary(syncCheckBox, authority, syncEnabled);
syncCheckBox.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@TargetApi(Build.VERSION_CODES.M)
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean syncEnabled = (Boolean) newValue;
if (syncEnabled) {
if (checkContactsPermission(authority)) {
ContentResolver.setSyncAutomatically(account, authority, true);
setSummary(syncCheckBox, authority, true);
return true;
} else {
requestPermissions(
new String[]{Manifest.permission.READ_CONTACTS},
REQUEST_PERMISSION_READ_CONTACTS);
// don't update preference
return false;
}
} else {
if (account == null) {
// if account could not be created for some reason,
// we can't have our sync
return false;
}
// disable syncs
ContentResolver.setSyncAutomatically(account, authority, false);
// cancel any ongoing/pending syncs
ContentResolver.cancelSync(account, authority);
setSummary(syncCheckBox, authority, false);
return true;
}
}
});
}
private boolean checkContactsPermission(String authority) {
if (!ContactsContract.AUTHORITY.equals(authority)) {
// provides convenience of not using separate checks for keyserver and contact sync
// in initializeSyncCheckBox
return true;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return true;
}
if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_CONTACTS)
== PackageManager.PERMISSION_GRANTED) {
return true;
}
return false;
}
@Override
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions,
@NonNull int[] grantResults) {
if (requestCode != REQUEST_PERMISSION_READ_CONTACTS) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
return;
}
boolean permissionWasGranted = grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED;
if (permissionWasGranted) {
// permission granted -> enable contact linking
AccountManager manager = AccountManager.get(getActivity());
final Account account = manager.getAccountsByType(Constants.ACCOUNT_TYPE)[0];
SwitchPreference pref = (SwitchPreference) findPreference(Constants.Pref.SYNC_CONTACTS);
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
setSummary(pref, ContactsContract.AUTHORITY, true);
pref.setChecked(true);
}
}
private void setSummary(SwitchPreference syncCheckBox, String authority,
boolean checked) {
switch (authority) {
case Constants.PROVIDER_AUTHORITY: {
if (checked) {
syncCheckBox.setSummary(R.string.label_sync_settings_keyserver_summary_on);
} else {
syncCheckBox.setSummary(R.string.label_sync_settings_keyserver_summary_off);
}
break;
}
case ContactsContract.AUTHORITY: {
if (checked) {
syncCheckBox.setSummary(R.string.label_sync_settings_contacts_summary_on);
} else {
syncCheckBox.setSummary(R.string.label_sync_settings_contacts_summary_off);
}
break;
}
}
}
}
/**

View file

@ -178,8 +178,7 @@
<string name="label_sync_settings_contacts_title">ربط المفاتيح بجهات الإتصال</string>
<string name="label_sync_settings_contacts_summary_off">لن يتم ربط المفاتيح الجديدة بجهات الإتصال</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">تحديثات تلقائية للمفاتيح</string>
<string name="label_experimental_settings_desc_title">تحذير</string>
<string name="label_experimental_settings_desc_title">تحذير</string>
<!--Proxy Preferences-->
<string name="pref_proxy_tor_title">فعّل تور</string>
<string name="pref_proxy_tor_summary">يتطلب نتصيب تطبيق أوربوت</string>

View file

@ -208,7 +208,6 @@
<string name="label_sync_settings_contacts_summary_on">Enllaça claus amb contactes basant-se amb noms i adreces de correu. Això succeeix completament fora de línia en el vostre dispositiu.</string>
<string name="label_sync_settings_contacts_summary_off">Les noves claus no s\'enllaçaran amb els contactes</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Actualització de claus automàticament</string>
<string name="label_experimental_settings_desc_title">Advertència</string>
<string name="label_experimental_settings_keybase_title">Proves de Keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Contacta amb keybase.io per proves de clau i mostra-les cada vegada que es mostri una clau</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Protojit klíče s kontakty na základě jmen a emailových adres. Odehrává se kompletně offline na vašem zařízení.</string>
<string name="label_sync_settings_contacts_summary_off">Nové klíče nebudou propojeny s kontakty</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automaticky aktualizovat klíč</string>
<string name="label_experimental_settings_desc_title">Varovnání</string>
<string name="label_experimental_settings_desc_summary">Tyto funkce nejsou ještě dokončené nebo neprošli uživatelským testováním/bezpečnostním auditem. Prosím, nespoléhejte na jejich zabezpečení a nehlašte problémy s nimi spojené, pokud na ně narazíte.</string>
<string name="label_experimental_settings_keybase_title">Keybase.io Proofs</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Schlüssel basierend auf Namen und E-Mail-Adressen mit Kontakten verknüpfen. Das alles findet komplett offline auf deinem Gerät statt.</string>
<string name="label_sync_settings_contacts_summary_off">Neue Schlüssel werden nicht mit Kontakten verknüpft</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatische Schlüsselaktualisierung</string>
<string name="label_experimental_settings_desc_title">Warnung</string>
<string name="label_experimental_settings_desc_summary">Diese Funktionen sind noch nicht final oder das Ergebnis von Benutzererfahrungs-/Sicherheitsuntersuchungen. Verlasse dich daher nicht auf deren Sicherheit und melde uns bitte keine auftretenden Probleme!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io-Nachweise</string>

View file

@ -210,8 +210,7 @@
<string name="label_sync_settings_contacts_summary_on">Vincular claves a contactos basándose en nombres y direcciones de correo electrónico. Esto ocurre sin conexión completamente en tu dispositivo.</string>
<string name="label_sync_settings_contacts_summary_off">Nuevas claves no serán vinculadas a contactos</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Actualizaciones automáticas de claves</string>
<string name="label_experimental_settings_desc_title">Advertencia</string>
<string name="label_experimental_settings_desc_title">Advertencia</string>
<!--Proxy Preferences-->
<string name="pref_proxy_tor_title">Activar Tor</string>
<string name="pref_proxy_tor_summary">Requiere Orbot instalado</string>

View file

@ -212,8 +212,7 @@
<string name="label_sync_settings_contacts_summary_on">Vincula claves con contactos basándose en nombres y direcciones de correo electrónico. Esto sucede con su dispositivo completamente desconectado.</string>
<string name="label_sync_settings_contacts_summary_off">Las claves nuevas no se vincularán a contactos</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Actualizaciones automáticas de claves</string>
<string name="label_experimental_settings_desc_title">Advertencia</string>
<string name="label_experimental_settings_desc_title">Advertencia</string>
<string name="label_experimental_settings_desc_summary">Estas características todavía no están finalizadas o no se han obtenido los resultados de experiencia del usuario y la investigación de seguridad. Por tanto, no confíe en su seguridad y, por favor, ¡no informe de los problemas que encuentre!</string>
<string name="label_experimental_settings_keybase_title">Comprobantes de Keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Contacta con keybase.io para obtener comprobantes de clave y muestrelos cada vez que se muestra una clave</string>

View file

@ -206,8 +206,7 @@
<string name="label_sync_settings_contacts_summary_on">Lotu giltzak harremanekin izen eta post@ helbideetan ohinarrituz. Hau erabat lineaz-kanpo gertatzen da zure gailuan.</string>
<string name="label_sync_settings_contacts_summary_off">Giltza berriak ez dira harremanekin lotuko</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Berezgaitasunez eguneratu giltzak</string>
<string name="label_experimental_settings_desc_title">Kontuz</string>
<string name="label_experimental_settings_desc_title">Kontuz</string>
<string name="label_experimental_settings_desc_summary">Ezaugarri hauek ez dute amaitu edo erabiltzaile jarduera/segurtasun emaitzak erdietsita. Honela, ez dira beren segurtasunean ohinarritzen eta mesedez ez jakinarazi aurkitzen dituzun arazoak!</string>
<string name="label_experimental_settings_keybase_summary">Jarri harremanetan keybase.io giltzak probatzeko eta erakutsi hauek giltza bat erakusten den bakoitzean</string>
<string name="label_experimental_settings_theme_summary">(Ikurrak eta ikusleiho asko oraindik ez daude azalgai ilunarekin zehaztuta)</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Relier les clés aux contacts daprès les noms et les adresses courriel. Cela se passe entièrement hors ligne sur votre appareil.</string>
<string name="label_sync_settings_contacts_summary_off">Les nouvelles clés ne seront pas reliées aux contacts</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Mises à jour automatiques des clés</string>
<string name="label_experimental_settings_desc_title">Avertissement</string>
<string name="label_experimental_settings_desc_summary">Ces fonctions ne sont pas encore terminées et nont pas fait lobjet de recherche sur leur convivialité ni leur sécurité. Par conséquent, ne vous fiez pas à leur sécurité et veuillez ne pas signaler les problèmes que vous rencontrez.</string>
<string name="label_experimental_settings_keybase_title">Preuves keybase.io</string>

View file

@ -211,8 +211,7 @@
<string name="label_sync_settings_contacts_summary_on">Ligar chaves a contactos baseándose en nomes e enderezos de correo electrónico. Isto acontece sen precisar conexión a rede no seu dispositivo.</string>
<string name="label_sync_settings_contacts_summary_off">As novas chaves non se ligarán aos contactos</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Actualización automática de chaves</string>
<string name="label_experimental_settings_desc_title">Aviso</string>
<string name="label_experimental_settings_desc_title">Aviso</string>
<string name="label_experimental_settings_desc_summary">Estas características aínda non están rematadas ou son resultado da investigación da experiencia de usuaria e/ou seguridade. Xa que logo, non confíe na súa seguridade e por favor non informe sobre os fallos que poida atopar!</string>
<string name="label_experimental_settings_keybase_title">probas de Keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Pedirlle probas de chave a keybase.io e expoñelas cada vez que se mostra a chave</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Kulcsok összekapcsolása partnerekkel a nevük és az e-mail címük alapján. Ez teljesen mértékben hálózati kapcsolat nélkül történik az ön eszközén.</string>
<string name="label_sync_settings_contacts_summary_off">Az új kulcsok nem lesznek összekapcsolva partnerekkel</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatikus kulcsfrissítések</string>
<string name="label_experimental_settings_desc_title">Figyelmeztetés</string>
<string name="label_experimental_settings_desc_summary">Ezek a funkciók még nincsenek befejezve, vagy felhasználói élmény és biztonsági kutatást eredményei. Emiatt ne bízzon a biztonságukban, és ne jelentse a felmerülő hibákat!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io igazolások</string>

View file

@ -194,8 +194,7 @@
<string name="label_sync_settings_contacts_summary_on">Collega le chiavi ai contatti in base ai nomi e indirizzi email. Ciò avviene completamente offline sul tuo dispositivo.</string>
<string name="label_sync_settings_contacts_summary_off">Le chiavi nuove non verranno collegate ai contatti</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Aggiornamenti automatici delle chiavi</string>
<string name="label_experimental_settings_desc_title">Attenzione</string>
<string name="label_experimental_settings_desc_title">Attenzione</string>
<string name="label_experimental_settings_desc_summary">Queste funzioni non sono ancora finite o testate da utenti/ricerche di sicurezza. Perciò non contare sulla loro sicurezza e per favore non segnalare i problemi che riscontri!</string>
<string name="label_experimental_settings_keybase_summary">Contatta keybase.io per avere prove e mostrale ogni volta che visualizzo una chiave</string>
<string name="label_experimental_settings_theme_summary">(Le icone e molte schermate non sono ancora modificate correttamente per il tema scuro)</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">オフランで完結して、名前とメールアドレスに基づいて、鍵を連絡先にリンク</string>
<string name="label_sync_settings_contacts_summary_off">新しい鍵は連絡先と関連付けしない</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">鍵の自動アップデート</string>
<string name="label_experimental_settings_desc_title">注意</string>
<string name="label_experimental_settings_desc_summary">これらの機能はまだ完成していないか、ユーザーエクスペリエンス/セキュリティ研究の結果ではありません。そのため、このセキュリティに依存したり、遭遇した問題を報告しないでください!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io 検証</string>

View file

@ -202,8 +202,7 @@
<string name="label_sync_settings_contacts_summary_on">이름과 이메일 주소에 기초해 키를 연락처에 연결합니다. 이 작업은 완전히 오프라인에서만 수행됩니다.</string>
<string name="label_sync_settings_contacts_summary_off">새 키를 앞으로 연락처에 연결하지 않음</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">자동 키 갱신</string>
<string name="label_experimental_settings_desc_title">경고</string>
<string name="label_experimental_settings_desc_title">경고</string>
<string name="label_experimental_settings_desc_summary">이 기능들은 아직 완성되지 않았거나 유저 경험/보안 연구의 결과가 아닙니다. 그러니 이 기능의 보안성에 의존하거나 겪는 문제를 보고하지 말아주세요!</string>
<string name="label_experimental_settings_keybase_summary">keybase.io에 연결해서 키가 표시될 때 마다 키 증명을 표시</string>
<string name="label_experimental_settings_theme_summary">(아이콘이나 많은 화면이 검은 테마에 알맞게 아직 조정되지 않았습니다)</string>

View file

@ -202,8 +202,7 @@
<string name="label_sync_settings_contacts_summary_on">Lenk nøkler til kontakter basert på navn og e-postadresser. Dette skjer helt frakoblet på din enhet.</string>
<string name="label_sync_settings_contacts_summary_off">Nye nøkler vil ikke lenkes til kontakter</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatiske nøkkeloppdateringer</string>
<string name="label_experimental_settings_desc_title">Advarsel</string>
<string name="label_experimental_settings_desc_title">Advarsel</string>
<string name="label_experimental_settings_desc_summary">Disse funksjonene er ikke ferdige enda, eller resultat av brukererfaring/sikkerhetsforskning. Som sådan, bør du ikke stole på at de er sikre, og ikke rapportere feil du kommer over!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io-bevis</string>
<string name="label_experimental_settings_keybase_summary">Kontakt keybase.io for nøkkelbevis og vis dem hver gang en nøkkel vises</string>

View file

@ -212,8 +212,7 @@
<string name="label_sync_settings_contacts_summary_on">Koppel sleutels aan contacten gebaseerd op namen en e-mailadressen. Dit gebeurt volledig offline op je apparaat.</string>
<string name="label_sync_settings_contacts_summary_off">Nieuwe sleutels zullen niet worden gekoppeld aan contacten</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatische sleutelupdates</string>
<string name="label_experimental_settings_desc_title">Waarschuwing</string>
<string name="label_experimental_settings_desc_title">Waarschuwing</string>
<string name="label_experimental_settings_desc_summary">Deze functies zijn nog niet afgewerkt of zijn resultaten van gebruikerservaringen/beveiligingsonderzoek. Vertrouw daarom niet op hun beveiliging en rapporteer geen problemen die je ervaart!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io-bewijzen</string>
<string name="label_experimental_settings_keybase_summary">Maak contact met keybase.io voor bevestigingen van sleutels en toon deze telkens wanneer een sleutel wordt weergegeven</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Koppel sleutels aan contacten gebaseerd op namen en e-mailadressen. Dit gebeurt volledig offline op je apparaat.</string>
<string name="label_sync_settings_contacts_summary_off">Nieuwe sleutels zullen niet worden gekoppeld aan contacten</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatische sleutelupdates</string>
<string name="label_experimental_settings_desc_title">Waarschuwing</string>
<string name="label_experimental_settings_desc_summary">Deze functies zijn nog niet afgewerkt of zijn resultaten van gebruikerservaringen/beveiligingsonderzoek. Vertrouw daarom niet op hun beveiliging en rapporteer geen problemen die je ervaart!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io-bewijzen</string>

View file

@ -212,8 +212,7 @@
<string name="label_sync_settings_contacts_summary_on">Połącz klucze z kontaktami używając nazw i adresów e-mail. Ta operacja jest wykonywana offline wyłączenie na tym urządzeniu.</string>
<string name="label_sync_settings_contacts_summary_off">Nowe klucze nie będą połączone z kontaktami</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatyczne aktualizacje kluczy</string>
<string name="label_experimental_settings_desc_title">Ostrzeżenie</string>
<string name="label_experimental_settings_desc_title">Ostrzeżenie</string>
<string name="label_experimental_settings_desc_summary">Te funkcje nie są jeszcze skończone lub są wynikiem badań bezpieczeństwa / wrażeń użytkownika. Tak więc nie polegaj na ich bezpieczeństwie i nie zgłaszaj problemów z nimi związanych!</string>
<string name="label_experimental_settings_keybase_title">Dowody keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Sprawdź keybase.io dla dowodów kluczy i pokaż je za każdym razem kiedy klucz jest wyświetlany</string>

View file

@ -212,8 +212,7 @@
<string name="label_sync_settings_contacts_summary_on">Vincula chaves a contatos com base em nomes e endereços de email. Isto acontece completamente off-line em seu dispositivo.</string>
<string name="label_sync_settings_contacts_summary_off">Novas chaves não serão vinculadas aos contatos</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Atualização automática de chaves</string>
<string name="label_experimental_settings_desc_title">Aviso</string>
<string name="label_experimental_settings_desc_title">Aviso</string>
<string name="label_experimental_settings_desc_summary">Esses recursos ainda não estão finalizados ou resultam de pesquisas de experiência/segurança do usuário. Dessa forma, não confie em sua segurança e, por favor, não relate problemas que encontre!</string>
<string name="label_experimental_settings_keybase_title">Provas Keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Contate o keybase.io para as provas de chaves e mostre-as toda vez que uma chave for exibida</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Связывать ключи с контактами основываясь на именах и адресах электронной почты. Это происходит полностью в автономном режиме на вашем устройстве.</string>
<string name="label_sync_settings_contacts_summary_off">Новые ключи не будут связаны с контактами</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Автообновление ключей</string>
<string name="label_experimental_settings_desc_title">Предупреждение</string>
<string name="label_experimental_settings_desc_summary">Эти новые возможности ещё не закончены и/или пока только изучаются. Проще говоря, не стоит полагаться на их безопасность. Пожалуйста, не сообщайте о связанных с ними проблемах!</string>
<string name="label_experimental_settings_keybase_title">Подтверждение Keybase.io </string>

View file

@ -188,8 +188,7 @@
<string name="label_sync_settings_contacts_summary_on">Повезивање кључева са контактима на основу имена и е-адреса. Одвија се у потпуности ван везе на вашем уређају.</string>
<string name="label_sync_settings_contacts_summary_off">Нови кључеви неће бити повезани са контактима</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Аутоматско ажурирање кључева</string>
<string name="label_experimental_settings_desc_title">Упозорење</string>
<string name="label_experimental_settings_desc_title">Упозорење</string>
<string name="label_experimental_settings_desc_summary">Ове функције још нису завршене или су резултат истраживања корисничког искуства и безбедности. Стога се не ослањајте на њихову безбедност и молимо вас да не пријављујете грешке на које наиђете!</string>
<string name="label_experimental_settings_keybase_summary">Тражење доказа кључева на keybase.io и њихов приказ приликом приказивања кључа</string>
<string name="label_experimental_settings_theme_summary">(Иконе и многи екрани још нису прилагођени за тамну тему)</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">Länka nycklar till kontakter baserade på namn och e-postadresser. Detta sker helt offline på enheten.</string>
<string name="label_sync_settings_contacts_summary_off">Nya nycklar kommer inte att kopplas till kontakter</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Automatiska nyckeluppdateringar</string>
<string name="label_experimental_settings_desc_title">Varning</string>
<string name="label_experimental_settings_desc_summary">Dessa funktioner är ännu inte färdiga eller resultat av användarupplevelse/säkerhetsforskning. Lita därför inte på deras säkerhet och var snäll och rapportera inte problem du stöter på!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io proofs</string>

View file

@ -212,8 +212,7 @@
<string name="label_sync_settings_contacts_summary_on">Прив\'язувати ключі до контактів на основі імен та адрес електронної пошти. Це відбувається повністю локально на Вашому пристрої.</string>
<string name="label_sync_settings_contacts_summary_off">Нові ключі не будуть прив\'язані до контактів</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Автоматичне оновлення ключів</string>
<string name="label_experimental_settings_desc_title">Попередження</string>
<string name="label_experimental_settings_desc_title">Попередження</string>
<string name="label_experimental_settings_desc_summary">Ці можливості ще в розробці. Будь ласка, не сподівайтесь на їх безпеку та не повідомляйте про проблеми їхнього використання!</string>
<string name="label_experimental_settings_keybase_title">Перевірки Keybase.io</string>
<string name="label_experimental_settings_keybase_summary">Контактувати з keybase.io для підтвердження ключа та показувати дійсності щоразу, коли ключ відображено</string>

View file

@ -189,8 +189,7 @@
<string name="label_sync_settings_contacts_summary_on">Liên kết khóa với danh bạ dựa trên tên và địa chỉ thư. Nó được thực hiện hoàn toàn ngoại tuyến trên thiết bị của bạn.</string>
<string name="label_sync_settings_contacts_summary_off">Các khóa mới sẽ không được liên kết với danh bạ</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">Cập nhật khóa tự động</string>
<string name="label_experimental_settings_desc_title">Cảnh báo</string>
<string name="label_experimental_settings_desc_title">Cảnh báo</string>
<string name="label_experimental_settings_desc_summary">Tính năng này hiện chưa được hoàn thành hoặc chỉ mới là kết quả nghiên cứu/thử nghiệm. Do vậy, bạn đừng tin cậy vào tính an toàn của chúng cũng như không cần thiết phải thông báo với chúng tôi!</string>
<string name="label_experimental_settings_keybase_summary">Liên hệ với keybase.io để minh chứng khóa và hiển thị chúng mỗi khi khóa được gọi</string>
<string name="label_experimental_settings_theme_summary">(Các biểu tượng và nhiều màn hình không được thêm vào giao diện dạng tối)</string>

View file

@ -213,8 +213,7 @@
<string name="label_sync_settings_contacts_summary_on">連接金鑰至聯絡人(基於姓名和電子郵件地址)。這只在您的裝置上離線進行。</string>
<string name="label_sync_settings_contacts_summary_off">新的金鑰將不會與聯絡人連接</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">自動金鑰同步</string>
<string name="label_experimental_settings_desc_title">警告</string>
<string name="label_experimental_settings_desc_title">警告</string>
<string name="label_experimental_settings_keybase_title">Keybase.io 證明</string>
<!--Proxy Preferences-->
<string name="pref_proxy_tor_title">啟用洋蔥(Tor)網路</string>

View file

@ -212,7 +212,6 @@
<string name="label_sync_settings_contacts_summary_on">根据名字和邮件地址将密钥关联到联系人。这是本地操作,不需要设备联网。</string>
<string name="label_sync_settings_contacts_summary_off">新密钥将不会与联系人相关联</string>
<!--label shown in Android settings under the OpenKeychain account-->
<string name="keyserver_sync_settings_title">自动更新密钥</string>
<string name="label_experimental_settings_desc_title">警告</string>
<string name="label_experimental_settings_desc_summary">这些功能目前尚未完成或者缺少用户经验性/安全性的研究结果。所以,不保证他们是安全的,请不要报告遇到的问题!</string>
<string name="label_experimental_settings_keybase_title">Keybase.io 证明</string>

View file

@ -220,11 +220,6 @@
<string name="label_sync_settings_keyserver_summary_on">"Every three days, keys are updated from the preferred keyserver"</string>
<string name="label_sync_settings_keyserver_summary_off">"Keys are not automatically updated"</string>
<string name="label_sync_settings_wifi_title">"Sync only on Wi-Fi"</string>
<string name="label_sync_settings_contacts_title">"Link keys to contacts"</string>
<string name="label_sync_settings_contacts_summary_on">"Link keys to contacts based on names and email addresses. This happens completely offline on your device."</string>
<string name="label_sync_settings_contacts_summary_off">"New keys will not be linked to contacts"</string>
<!-- label shown in Android settings under the OpenKeychain account -->
<string name="keyserver_sync_settings_title">"Automatic key updates"</string>
<string name="label_experimental_settings_desc_title">"Warning"</string>
<string name="label_experimental_settings_desc_summary">"These features are not yet finished or results of user experience/security research. Thus, don't rely on their security and please don't report issues you encounter!"</string>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
android:accountPreferences="@xml/account_preferences"
android:accountType="@string/account_type"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" />

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="com.android.contacts"
android:accountType="@string/account_type"
android:supportsUploading="false"
android:userVisible="true"
android:allowParallelSyncs="false"
android:isAlwaysSyncable="true" />

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ContactsSource xmlns:android="http://schemas.android.com/apk/res/android">
<ContactsDataKind
android:mimeType="vnd.android.cursor.item/vnd.org.sufficientlysecure.keychain.key"
android:detailColumn="data1" />
</ContactsSource>

View file

@ -3,15 +3,14 @@
android:key="syncKeyserver"
android:defaultValue="true"
android:persistent="true"
android:title="@string/label_sync_settings_keyserver_title"/>
android:title="@string/label_sync_settings_keyserver_title"
android:summaryOn="@string/label_sync_settings_keyserver_summary_on"
android:summaryOff="@string/label_sync_settings_keyserver_summary_off"
/>
<SwitchPreference
android:key="enableWifiSyncOnly"
android:defaultValue="true"
android:persistent="true"
android:dependency="syncKeyserver"
android:title="@string/label_sync_settings_wifi_title"/>
<SwitchPreference
android:key="syncContacts"
android:persistent="false"
android:title="@string/label_sync_settings_contacts_title" />
</PreferenceScreen>