Show notification when READ_CONTACTS permission is denied in sync service, hide linked contact card if permission is denied
This commit is contained in:
@@ -18,14 +18,12 @@
|
||||
package org.sufficientlysecure.keychain.operations;
|
||||
|
||||
|
||||
import java.net.Proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import org.sufficientlysecure.keychain.keyimport.HkpKeyserver;
|
||||
import org.sufficientlysecure.keychain.operations.results.CertifyResult;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult.LogType;
|
||||
import org.sufficientlysecure.keychain.operations.results.OperationResult.OperationLog;
|
||||
@@ -51,8 +49,6 @@ import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
|
||||
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel.NfcSignOperationsBuilder;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
import org.sufficientlysecure.keychain.util.orbot.OrbotHelper;
|
||||
|
||||
/**
|
||||
* An operation which implements a high level user id certification operation.
|
||||
@@ -256,7 +252,7 @@ public class CertifyOperation extends BaseOperation<CertifyActionsParcel> {
|
||||
}
|
||||
|
||||
// since only verified keys are synced to contacts, we need to initiate a sync now
|
||||
ContactSyncAdapterService.requestSync();
|
||||
ContactSyncAdapterService.requestContactsSync();
|
||||
|
||||
log.add(LogType.MSG_CRT_SUCCESS, 0);
|
||||
if (uploadError != 0) {
|
||||
|
||||
@@ -102,7 +102,7 @@ public class DeleteOperation extends BaseOperation<DeleteKeyringParcel> {
|
||||
int result = DeleteResult.RESULT_OK;
|
||||
if (success > 0) {
|
||||
// make sure new data is synced into contacts
|
||||
ContactSyncAdapterService.requestSync();
|
||||
ContactSyncAdapterService.requestContactsSync();
|
||||
|
||||
log.add(LogType.MSG_DEL_OK, 0, success);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ public class EditKeyOperation extends BaseOperation<SaveKeyringParcel> {
|
||||
updateProgress(R.string.progress_done, 100, 100);
|
||||
|
||||
// make sure new data is synced into contacts
|
||||
ContactSyncAdapterService.requestSync();
|
||||
ContactSyncAdapterService.requestContactsSync();
|
||||
|
||||
log.add(LogType.MSG_ED_SUCCESS, 0);
|
||||
return new EditKeyResult(EditKeyResult.RESULT_OK, log, ring.getMasterKeyId());
|
||||
|
||||
@@ -124,7 +124,7 @@ public class ImportOperation extends BaseOperation<ImportKeyringParcel> {
|
||||
|
||||
/**
|
||||
* Since the introduction of multithreaded import, we expect calling functions to handle the
|
||||
* contact-to-key sync i.e ContactSyncAdapterService.requestSync()
|
||||
* contact-to-key sync i.e ContactSyncAdapterService.requestContactsSync()
|
||||
*
|
||||
* @param entries keys to import
|
||||
* @param num number of keys to import
|
||||
@@ -325,7 +325,7 @@ public class ImportOperation extends BaseOperation<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.requestSync();
|
||||
// ContactSyncAdapterService.requestContactsSync();
|
||||
|
||||
// convert to long array
|
||||
long[] importedMasterKeyIdsArray = new long[importedMasterKeyIds.size()];
|
||||
@@ -405,7 +405,7 @@ public class ImportOperation extends BaseOperation<ImportKeyringParcel> {
|
||||
result = multiThreadedKeyImport(keyList.iterator(), keyList.size(), keyServer, proxy);
|
||||
}
|
||||
|
||||
ContactSyncAdapterService.requestSync();
|
||||
ContactSyncAdapterService.requestContactsSync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user