mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Fix file import, part 2
This commit is contained in:
parent
b5c0e4478c
commit
47acc45934
@ -166,6 +166,7 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
|
|||||||
mListFragment = ImportKeysListFragment.newInstance(bytes, filename);
|
mListFragment = ImportKeysListFragment.newInstance(bytes, filename);
|
||||||
|
|
||||||
// Add the fragment to the 'fragment_container' FrameLayout
|
// Add the fragment to the 'fragment_container' FrameLayout
|
||||||
|
// NOTE: We use commitAllowingStateLoss() to prevent wierd crashes!
|
||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.replace(R.id.import_keys_list_container, mListFragment)
|
.replace(R.id.import_keys_list_container, mListFragment)
|
||||||
.commitAllowingStateLoss();
|
.commitAllowingStateLoss();
|
||||||
@ -209,11 +210,7 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadCallback(byte[] importData, String importFilename) {
|
public void loadCallback(byte[] importData, String importFilename) {
|
||||||
if (mListFragment == null) {
|
mListFragment.loadNew(importData, importFilename);
|
||||||
startListFragment(null, importData, importFilename);
|
|
||||||
} else {
|
|
||||||
mListFragment.loadNew(importData, importFilename);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user