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 = new Bundle();
serverBundle.putString(ImportKeysServerFragment.ARG_QUERY, query); serverBundle.putString(ImportKeysServerFragment.ARG_QUERY, query);
serverBundle.putBoolean(ImportKeysServerFragment.ARG_DISABLE_QUERY_EDIT, true); serverBundle.putBoolean(ImportKeysServerFragment.ARG_DISABLE_QUERY_EDIT, true);
// display server tab only
serverOnly = true; serverOnly = true;
mSwitchToTab = NAV_SERVER; mSwitchToTab = NAV_SERVER;

View File

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