wrapped-key-ring: use CachedKeyRing where possible
This commit is contained in:
@@ -33,6 +33,7 @@ import com.beardedhen.androidbootstrap.BootstrapButton;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.remote.AccountSettings;
|
||||
import org.sufficientlysecure.keychain.ui.EditKeyActivity;
|
||||
@@ -179,9 +180,10 @@ public class AccountSettingsFragment extends Fragment implements
|
||||
// select newly created key
|
||||
try {
|
||||
long masterKeyId = new ProviderHelper(getActivity())
|
||||
.extractOrGetMasterKeyId(data.getData());
|
||||
.getCachedPublicKeyRing(data.getData())
|
||||
.extractOrGetMasterKeyId();
|
||||
mSelectKeyFragment.selectKey(masterKeyId);
|
||||
} catch (ProviderHelper.NotFoundException e) {
|
||||
} catch (PgpGeneralException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user