temporary fix for nullpointer on orientation change in import activity

This commit is contained in:
Dominik Schürmann
2014-02-04 18:59:40 +01:00
parent 82b0fba47d
commit b78a564de3
2 changed files with 11 additions and 5 deletions

View File

@@ -136,7 +136,7 @@ public class ImportKeysListFragment extends ListFragment implements
getLoaderManager().initLoader(LOADER_ID_BYTES, null, this);
}
if (mServerQuery != null) {
if (mServerQuery != null && mKeyServer != null) {
// Start out with a progress indicator.
setListShown(false);
@@ -165,14 +165,19 @@ public class ImportKeysListFragment extends ListFragment implements
mServerQuery = serverQuery;
mKeyServer = keyServer;
// Start out with a progress indicator.
setListShown(false);
if (mKeyBytes != null || mDataUri != null) {
// Start out with a progress indicator.
setListShown(false);
if (mKeyBytes != null || mDataUri != null)
getLoaderManager().restartLoader(LOADER_ID_BYTES, null, this);
}
if (mServerQuery != null && mKeyServer != null) {
// Start out with a progress indicator.
setListShown(false);
if (mServerQuery != null && mKeyServer != null)
getLoaderManager().restartLoader(LOADER_ID_SERVER_QUERY, null, this);
}
}
@Override