Compare commits
3 Commits
8d0bd1f853
...
pvabel
| Author | SHA1 | Date | |
|---|---|---|---|
|
93e226f0b7
|
|||
|
e9af366986
|
|||
|
b0f0417d43
|
@@ -111,6 +111,12 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
testOptions.unitTests.all {
|
||||
// log results of tests to console, useful for travis
|
||||
|
||||
@@ -21,6 +21,8 @@ import org.sufficientlysecure.keychain.operations.results.ImportKeyResult;
|
||||
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
public class ImportKeysOperationCallback implements
|
||||
CryptoOperationHelper.Callback<ImportKeyringParcel, ImportKeyResult> {
|
||||
|
||||
@@ -45,6 +47,7 @@ public class ImportKeysOperationCallback implements
|
||||
|
||||
@Override
|
||||
public void onCryptoOperationSuccess(ImportKeyResult result) {
|
||||
Timber.d("+onCryptoOperationSuccess");
|
||||
mResultListener.handleResult(result, mPosition);
|
||||
}
|
||||
|
||||
@@ -55,6 +58,7 @@ public class ImportKeysOperationCallback implements
|
||||
|
||||
@Override
|
||||
public void onCryptoOperationError(ImportKeyResult result) {
|
||||
Timber.d("+onCryptoOperationError");
|
||||
mResultListener.handleResult(result, mPosition);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,9 +50,12 @@ import org.sufficientlysecure.keychain.pgp.Progressable;
|
||||
import org.sufficientlysecure.keychain.pgp.SignEncryptParcel;
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
public class KeychainServiceTask {
|
||||
public static KeychainServiceTask create(Activity activity) {
|
||||
Timber.d("+create#1");
|
||||
Context context = activity.getApplicationContext();
|
||||
KeyWritableRepository keyRepository = KeyWritableRepository.create(context);
|
||||
return new KeychainServiceTask(context, keyRepository);
|
||||
|
||||
@@ -46,11 +46,14 @@ import org.sufficientlysecure.keychain.operations.ImportOperation;
|
||||
import org.sufficientlysecure.keychain.operations.results.ImportKeyResult;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedKeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedKeyRing.VerificationStatus;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKey;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||
import org.sufficientlysecure.keychain.ui.keyview.ViewKeyActivity;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||
import org.sufficientlysecure.keychain.util.IterableIterator;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableFileCache;
|
||||
import timber.log.Timber;
|
||||
|
||||
@@ -209,11 +212,17 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
}
|
||||
|
||||
private void getKey(int position, ImportKeysListEntry entry, boolean skipSave) {
|
||||
Timber.d("+getKey position %d, entry %s, skipSave %s", position, entry.getKeyIdHex(), skipSave ? "true" : "false");
|
||||
Timber.d("getKey => prepareKeyOperation");
|
||||
ImportKeyringParcel inputParcel = prepareKeyOperation(entry, skipSave);
|
||||
ImportKeysResultListener listener = skipSave ? this : mListener;
|
||||
Timber.d("getKey => new ImportKeysOperationCallback");
|
||||
ImportKeysOperationCallback cb = new ImportKeysOperationCallback(listener, inputParcel, position);
|
||||
Timber.d("getKey => new CryptoOperationHelper");
|
||||
CryptoOperationHelper opHelper = new CryptoOperationHelper<>(1, mActivity, cb, null);
|
||||
Timber.d("getKey => opHelper.cryptoOperation");
|
||||
opHelper.cryptoOperation();
|
||||
Timber.d("-getKey");
|
||||
}
|
||||
|
||||
private ImportKeyringParcel prepareKeyOperation(ImportKeysListEntry entry, boolean skipSave) {
|
||||
@@ -264,9 +273,18 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
ArrayList<CanonicalizedKeyRing> canKeyRings = result.mCanonicalizedKeyRings;
|
||||
if (canKeyRings.size() == 1) {
|
||||
CanonicalizedKeyRing keyRing = canKeyRings.get(0);
|
||||
Timber.e("Key ID: " + keyRing.getMasterKeyId() +
|
||||
"| isRev: " + keyRing.isRevoked() + "| isExp: " + keyRing.isExpired()
|
||||
+ "| isSec: " + keyRing.isSecure());
|
||||
Timber.e("Key ID: %016X| isRev: " + keyRing.isRevoked() + " | isExp: " + keyRing.isExpired()
|
||||
+ " | isSec: " + keyRing.isSecure(), keyRing.getMasterKeyId());
|
||||
try {
|
||||
Timber.e("[E]: %016X", keyRing.getEncryptId());
|
||||
} catch (PgpKeyNotFoundException ignored) {}
|
||||
try {
|
||||
Timber.e("[S]: %016X", keyRing.getSigningId());
|
||||
} catch (PgpKeyNotFoundException ignored) {}
|
||||
|
||||
for (CanonicalizedPublicKey val : keyRing.publicKeyIterator()) {
|
||||
Timber.e("KEY %016X; [%s%s%s%s]", val.getKeyId(), val.canAuthenticate() ? "A" : "", val.canCertify() ? "C" : "", val.canEncrypt() ? "E" : "", val.canSign() ? "S" : "");
|
||||
}
|
||||
|
||||
ImportKeysListEntry entry = mData.get(position);
|
||||
entry.setUpdated(result.isOkUpdated());
|
||||
|
||||
@@ -264,6 +264,7 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||
}
|
||||
|
||||
public void cryptoOperation(final CryptoInputParcel cryptoInput) {
|
||||
Timber.d("+cryptoOperation#1");
|
||||
T operationInput = mCallback.createOperationInput();
|
||||
if (operationInput == null) {
|
||||
return;
|
||||
@@ -320,8 +321,12 @@ public class CryptoOperationHelper<T extends Parcelable, S extends OperationResu
|
||||
}
|
||||
|
||||
public void cryptoOperation() {
|
||||
Timber.d("+cryptoOperation");
|
||||
operationStartTime = SystemClock.elapsedRealtime();
|
||||
cryptoOperation(CryptoInputParcel.createCryptoInputParcel(new Date()));
|
||||
Timber.d("cryptoOperation => CryptoInputParcel.createCryptoInputParcel");
|
||||
CryptoInputParcel tmp = CryptoInputParcel.createCryptoInputParcel(new Date());
|
||||
Timber.d("cryptoOperation => cryptoOperation#1");
|
||||
cryptoOperation(tmp);
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
||||
18
build.gradle
18
build.gradle
@@ -22,7 +22,23 @@ allprojects {
|
||||
google()
|
||||
mavenCentral()
|
||||
// needed for some legacy libs that aren't available on mavenCentral
|
||||
jcenter()
|
||||
//jcenter()
|
||||
// used by:
|
||||
// - com.github.BelooS:ChipsLayoutManager:v0.3.7@aar
|
||||
maven { url 'https://jitpack.io' }
|
||||
// used by:
|
||||
// - com.fidesmo:nordpol-android:0.1.22
|
||||
// - com.journeyapps:zxing-android-embedded:3.4.0
|
||||
maven { url 'https://repo.spring.io/libs-milestone/' }
|
||||
// used by:
|
||||
// - eu.davidea:flexible-adapter:5.1.0
|
||||
maven { url 'https://verve.jfrog.io/artifactory/verve-gradle-release/' }
|
||||
// used by:
|
||||
// - eu.davidea:flexible-adapter-ui:1.0.0-b5
|
||||
maven { url 'https://repo.spring.io/plugins-release/' }
|
||||
// used by:
|
||||
// - eu.davidea:flexible-adapter-livedata:1.0.0-b2
|
||||
maven { url 'https://maven.scijava.org/content/repositories/public/' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
extern/MaterialChipsInput/build.gradle
vendored
2
extern/MaterialChipsInput/build.gradle
vendored
@@ -26,6 +26,6 @@ dependencies {
|
||||
|
||||
// recycler
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
implementation 'com.beloo.widget:ChipsLayoutManager:0.3.7@aar'
|
||||
implementation 'com.github.BelooS:ChipsLayoutManager:v0.3.7@aar'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user