Finished cleaning up rebase conflicts post Keyserver exception refactor

This commit is contained in:
Tim Bray
2014-05-23 09:42:32 -07:00
parent 1ff3962acc
commit 58da3d12b0
6 changed files with 33 additions and 32 deletions

View File

@@ -211,7 +211,7 @@ public class ImportKeysListFragment extends ListFragment implements
@Override
public Loader<AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>>
onCreateLoader(int id, Bundle args) {
onCreateLoader(int id, Bundle args) {
switch (id) {
case LOADER_ID_BYTES: {
InputData inputData = getInputData(mKeyBytes, mDataUri);
@@ -285,15 +285,15 @@ public class ImportKeysListFragment extends ListFragment implements
} else if (error instanceof Keyserver.QueryTooShortException) {
AppMsg.makeText(getActivity(), R.string.error_keyserver_insufficient_query,
AppMsg.STYLE_ALERT).show();
} else if (error instanceof Keyserver.QueryException) {
String alert = getActivity().getString(R.string.error_searching_keys);
alert = alert + " (" + error.getLocalizedMessage() + ")";
AppMsg.makeText(getActivity(), alert, AppMsg.STYLE_ALERT).show();
} else if (error instanceof Keyserver.TooManyResponsesException) {
AppMsg.makeText(getActivity(), R.string.error_keyserver_too_many_responses,
AppMsg.STYLE_ALERT).show();
} else if (error instanceof Keyserver.QueryException) {
Log.d(Constants.TAG, "Key server query failed: " + error.getLocalizedMessage());
} else if (error instanceof Keyserver.QueryFailedException) {
Log.d(Constants.TAG,
"Unrecoverable keyserver query error: " + error.getLocalizedMessage());
String alert = getActivity().getString(R.string.error_searching_keys);
alert = alert + " (" + error.getLocalizedMessage() + ")";
AppMsg.makeText(getActivity(), alert, AppMsg.STYLE_ALERT).show();
}
break;

View File

@@ -94,7 +94,7 @@ public class ImportKeysListKeybaseLoader
mEntryList.addAll(searchResult);
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, null);
} catch (Keyserver.QueryException e) {
} catch (Keyserver.QueryFailedException e) {
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, e);
} catch (Keyserver.QueryNeedsRepairException e) {
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, e);

View File

@@ -116,7 +116,7 @@ public class ImportKeysListServerLoader
mEntryList.addAll(searchResult);
}
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, null);
} catch (Keyserver.QueryException e) {
} catch (Keyserver.QueryFailedException e) {
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, e);
} catch (Keyserver.QueryNeedsRepairException e) {
mEntryListWrapper = new AsyncTaskResultWrapper<ArrayList<ImportKeysListEntry>>(mEntryList, e);