mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-13 04:25:00 -05:00
commit
6156600e42
@ -641,7 +641,6 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
sendErrorToHandler(e);
|
||||
}
|
||||
} else if (ACTION_DOWNLOAD_AND_IMPORT_KEYS.equals(action) || ACTION_IMPORT_KEYBASE_KEYS.equals(action)) {
|
||||
try {
|
||||
ArrayList<ImportKeysListEntry> entries = data.getParcelableArrayList(DOWNLOAD_KEY_LIST);
|
||||
|
||||
// this downloads the keys and places them into the ImportKeysListEntry entries
|
||||
@ -649,6 +648,7 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
|
||||
ArrayList<ParcelableKeyRing> keyRings = new ArrayList<ParcelableKeyRing>(entries.size());
|
||||
for (ImportKeysListEntry entry : entries) {
|
||||
try {
|
||||
Keyserver server;
|
||||
if (entry.getOrigin() == null) {
|
||||
server = new HkpKeyserver(keyServer);
|
||||
@ -671,6 +671,9 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
// save key bytes in entry object for doing the
|
||||
// actual import afterwards
|
||||
keyRings.add(new ParcelableKeyRing(downloadedKeyBytes, entry.getFingerprintHex()));
|
||||
} catch (Exception e) {
|
||||
sendErrorToHandler(e);
|
||||
}
|
||||
}
|
||||
|
||||
Intent importIntent = new Intent(this, KeychainIntentService.class);
|
||||
@ -686,9 +689,6 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
onHandleIntent(importIntent);
|
||||
|
||||
// result is handled in ACTION_IMPORT_KEYRING
|
||||
} catch (Exception e) {
|
||||
sendErrorToHandler(e);
|
||||
}
|
||||
} else if (ACTION_CERTIFY_KEYRING.equals(action)) {
|
||||
try {
|
||||
|
||||
|
@ -82,7 +82,7 @@ import se.emilsjolander.stickylistheaders.StickyListHeadersListView;
|
||||
*/
|
||||
public class KeyListFragment extends LoaderFragment
|
||||
implements SearchView.OnQueryTextListener, AdapterView.OnItemClickListener,
|
||||
LoaderManager.LoaderCallbacks<Cursor>, NoScrollableSwipeRefreshLayout.OnRefreshListener {
|
||||
LoaderManager.LoaderCallbacks<Cursor>, ListAwareSwipeRefreshLayout.OnRefreshListener {
|
||||
|
||||
private KeyListAdapter mAdapter;
|
||||
private StickyListHeadersListView mStickyList;
|
||||
|
@ -70,9 +70,13 @@ public class ListAwareSwipeRefreshLayout extends NoScrollableSwipeRefreshLayout
|
||||
|
||||
return (mIsLocked || (
|
||||
mStickyListHeadersListView.getWrappedList().getChildCount() > 0
|
||||
&& (mStickyListHeadersListView.getTop() > 0
|
||||
|| mStickyListHeadersListView.getFirstVisiblePosition() > 0
|
||||
))
|
||||
&&
|
||||
(
|
||||
mStickyListHeadersListView.getWrappedList().getChildAt(0).getTop() < 0
|
||||
||
|
||||
mStickyListHeadersListView.getFirstVisiblePosition() > 0
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user