Enable sync adapter, changelog
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
* New icons to show status of key (by Brennan Novak)
|
* New icons to show status of key (by Brennan Novak)
|
||||||
* Important bug fix: Importing of large key collections from a file is now possible
|
* Important bug fix: Importing of large key collections from a file is now possible
|
||||||
* Notification showing cached passphrases
|
* Notification showing cached passphrases
|
||||||
|
* Keys are connected to Android's contacts
|
||||||
|
|
||||||
This release wouldn't be possible without the work of Vincent Breitmoser (GSoC 2014), mar-v-in (GSoC 2014), Daniel Albert, Art O Cathain, Daniel Haß, Tim Bray, Thialfihar
|
This release wouldn't be possible without the work of Vincent Breitmoser (GSoC 2014), mar-v-in (GSoC 2014), Daniel Albert, Art O Cathain, Daniel Haß, Tim Bray, Thialfihar
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ package org.sufficientlysecure.keychain;
|
|||||||
import android.accounts.Account;
|
import android.accounts.Account;
|
||||||
import android.accounts.AccountManager;
|
import android.accounts.AccountManager;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import android.provider.ContactsContract;
|
||||||
|
|
||||||
import org.spongycastle.jce.provider.BouncyCastleProvider;
|
import org.spongycastle.jce.provider.BouncyCastleProvider;
|
||||||
import org.sufficientlysecure.keychain.helper.Preferences;
|
import org.sufficientlysecure.keychain.helper.Preferences;
|
||||||
@@ -112,8 +114,10 @@ public class KeychainApplication extends Application {
|
|||||||
AccountManager manager = AccountManager.get(context);
|
AccountManager manager = AccountManager.get(context);
|
||||||
Account[] accounts = manager.getAccountsByType(Constants.PACKAGE_NAME);
|
Account[] accounts = manager.getAccountsByType(Constants.PACKAGE_NAME);
|
||||||
if (accounts == null || accounts.length == 0) {
|
if (accounts == null || accounts.length == 0) {
|
||||||
Account dummy = new Account(context.getString(R.string.app_name), Constants.PACKAGE_NAME);
|
Account account = new Account(context.getString(R.string.app_name), Constants.PACKAGE_NAME);
|
||||||
manager.addAccountExplicitly(dummy, null, null);
|
manager.addAccountExplicitly(account, null, null);
|
||||||
|
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1);
|
||||||
|
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class ContactSyncAdapterService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider,
|
public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider,
|
||||||
final SyncResult syncResult) {
|
final SyncResult syncResult) {
|
||||||
|
Log.d(Constants.TAG, "Performing a sync!");
|
||||||
// TODO: Import is currently disabled for 2.8, until we implement proper origin management
|
// TODO: Import is currently disabled for 2.8, until we implement proper origin management
|
||||||
// importDone.set(false);
|
// importDone.set(false);
|
||||||
// KeychainApplication.setupAccountAsNeeded(ContactSyncAdapterService.this);
|
// KeychainApplication.setupAccountAsNeeded(ContactSyncAdapterService.this);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ And don't add newlines before or after p tags because of transifex -->
|
|||||||
<li>New icons to show status of key (by Brennan Novak)</li>
|
<li>New icons to show status of key (by Brennan Novak)</li>
|
||||||
<li>Important bug fix: Importing of large key collections from a file is now possible</li>
|
<li>Important bug fix: Importing of large key collections from a file is now possible</li>
|
||||||
<li>Notification showing cached passphrases</li>
|
<li>Notification showing cached passphrases</li>
|
||||||
|
<li>Keys are connected to Android's contacts</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>This release wouldn't be possible without the work of Vincent Breitmoser (GSoC 2014), mar-v-in (GSoC 2014), Daniel Albert, Art O Cathain, Daniel Haß, Tim Bray, Thialfihar</p>
|
<p>This release wouldn't be possible without the work of Vincent Breitmoser (GSoC 2014), mar-v-in (GSoC 2014), Daniel Albert, Art O Cathain, Daniel Haß, Tim Bray, Thialfihar</p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user