Merge remote-tracking branch 'origin/development' into development
This commit is contained in:
@@ -40,6 +40,7 @@ import android.widget.ListView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.ui.util.ActionBarHelper;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
@@ -226,10 +227,10 @@ public class EditKeyFragment extends LoaderFragment implements
|
||||
mSaveKeyringParcel = new SaveKeyringParcel(masterKeyId, keyRing.getFingerprint());
|
||||
mPrimaryUserId = keyRing.getPrimaryUserIdWithFallback();
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
finishWithError(LogType.MSG_EK_ERROR_NOT_FOUND);
|
||||
return;
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (NotFoundException e) {
|
||||
finishWithError(LogType.MSG_EK_ERROR_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.tokenautocomplete.TokenCompleteTextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
@@ -139,7 +140,7 @@ public class EncryptAsymmetricFragment extends Fragment implements EncryptActivi
|
||||
setSignatureKeyId(keyring.getMasterKeyId());
|
||||
mSign.setSelectedKeyId(mEncryptInterface.getSignatureKey());
|
||||
}
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
}
|
||||
@@ -151,7 +152,7 @@ public class EncryptAsymmetricFragment extends Fragment implements EncryptActivi
|
||||
CachedPublicKeyRing ring = mProviderHelper.getCachedPublicKeyRing(
|
||||
KeyRings.buildUnifiedKeyRingsFindBySubkeyUri(preselectedId));
|
||||
mEncryptKeyView.addObject(mEncryptKeyView.new EncryptionKey(ring));
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.UserIds;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainDatabase.Tables;
|
||||
@@ -115,7 +116,7 @@ public class MultiCertifyKeyFragment extends LoaderFragment
|
||||
if (key.canCertify()) {
|
||||
mCertifyKeySpinner.setSelectedKeyId(certifyKeyId);
|
||||
}
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "certify certify check failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKey;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
@@ -151,11 +152,11 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
||||
// the catch clause doesn't return.
|
||||
try {
|
||||
userId = mSecretRing.getPrimaryUserIdWithFallback();
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
userId = null;
|
||||
}
|
||||
|
||||
/* Get key type for message */
|
||||
/* Get key type for message */
|
||||
// find a master key id for our key
|
||||
long masterKeyId = new ProviderHelper(activity).getMasterKeyId(mSubKeyId);
|
||||
CachedPublicKeyRing keyRing = new ProviderHelper(activity).getCachedPublicKeyRing(masterKeyId);
|
||||
@@ -312,7 +313,7 @@ public class PassphraseDialogActivity extends FragmentActivity {
|
||||
PassphraseCacheService.addCachedPassphrase(getActivity(),
|
||||
mSecretRing.getMasterKeyId(), mSubKeyId, passphrase,
|
||||
mSecretRing.getPrimaryUserIdWithFallback());
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "adding of a passphrase failed", e);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import android.widget.TextView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.pgp.WrappedSignature;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
@@ -185,7 +186,7 @@ public class ViewCertActivity extends ActionBarActivity
|
||||
KeyRings.buildUnifiedKeyRingsFindBySubkeyUri(mCertifierKeyId)).getMasterKeyId();
|
||||
viewIntent.setData(KeyRings.buildGenericKeyRingUri(signerMasterKeyId));
|
||||
startActivity(viewIntent);
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
// TODO notify user of this, maybe offer download?
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import android.widget.ListView;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
@@ -308,7 +309,7 @@ public class ViewKeyMainFragment extends LoaderFragment implements
|
||||
}
|
||||
// used instead of startActivity set actionbar based on callingPackage
|
||||
startActivityForResult(intent, 0);
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.sufficientlysecure.keychain.compatibility.DialogFragmentWorkaround;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKey;
|
||||
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
@@ -145,7 +146,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
// the catch clause doesn't return.
|
||||
try {
|
||||
userId = mSecretRing.getPrimaryUserIdWithFallback();
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
userId = null;
|
||||
}
|
||||
|
||||
@@ -308,7 +309,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
PassphraseCacheService.addCachedPassphrase(getActivity(),
|
||||
mSecretRing.getMasterKeyId(), mSubKeyId, passphrase,
|
||||
mSecretRing.getPrimaryUserIdWithFallback());
|
||||
} catch (PgpGeneralException e) {
|
||||
} catch (PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "adding of a passphrase failed", e);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import com.tokenautocomplete.TokenCompleteTextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
|
||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||
import org.sufficientlysecure.keychain.util.ContactHelper;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
@@ -198,7 +199,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
|
||||
|
||||
}
|
||||
|
||||
public EncryptionKey(CachedPublicKeyRing ring) throws PgpGeneralException {
|
||||
public EncryptionKey(CachedPublicKeyRing ring) throws PgpKeyNotFoundException {
|
||||
this(ring.getPrimaryUserId(), ring.extractOrGetMasterKeyId(),
|
||||
KeyFormattingUtils.convertFingerprintToHex(ring.getFingerprint()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user