Fix update from keyserver flow

This commit is contained in:
Dominik Schürmann 2014-06-20 15:14:34 +02:00
parent f47bb1e8e2
commit 4aec28c237
2 changed files with 7 additions and 5 deletions

View File

@ -212,6 +212,7 @@ public class ImportKeysActivity extends ActionBarActivity {
serverBundle = new Bundle();
serverBundle.putString(ImportKeysServerFragment.ARG_QUERY, query);
serverBundle.putBoolean(ImportKeysServerFragment.ARG_DISABLE_QUERY_EDIT, true);
// display server tab only
serverOnly = true;
mSwitchToTab = NAV_SERVER;

View File

@ -149,12 +149,13 @@ public class ImportKeysListFragment extends ListFragment implements
mAdapter = new ImportKeysAdapter(mActivity);
setListAdapter(mAdapter);
if (getArguments().containsKey(ARG_DATA_URI) || getArguments().containsKey(ARG_BYTES)) {
Uri dataUri = getArguments().getParcelable(ARG_DATA_URI);
byte[] bytes = getArguments().getByteArray(ARG_BYTES);
mLoaderState = new BytesLoaderState(bytes, dataUri);
} else if (getArguments().containsKey(ARG_SERVER_QUERY)) {
String query = getArguments().getString(ARG_SERVER_QUERY);
if (dataUri != null || bytes != null) {
mLoaderState = new BytesLoaderState(bytes, dataUri);
} else if (query != null) {
// TODO: this is used when scanning QR Code or updating a key.
// Currently it simply uses keyserver nr 0
String keyserver = Preferences.getPreferences(getActivity())