mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
fixing layout when creating default rsa keys
This commit is contained in:
parent
73a2957d95
commit
26a9a9e423
@ -84,6 +84,9 @@ public class EditKeyActivity extends SherlockFragmentActivity { // extends BaseA
|
||||
Vector<PGPSecretKey> mKeys;
|
||||
Vector<Integer> mKeysUsages;
|
||||
|
||||
// will be set to true to build layout later in handler
|
||||
private boolean mBuildLayout = true;
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
menu.add(1, Id.menu.option.cancel, 0, R.string.btn_doNotSave).setShowAsAction(
|
||||
@ -175,6 +178,9 @@ public class EditKeyActivity extends SherlockFragmentActivity { // extends BaseA
|
||||
.getBoolean(Apg.EXTRA_GENERATE_DEFAULT_KEYS);
|
||||
if (generateDefaultKeys) {
|
||||
|
||||
// build layout in handler after generating keys not directly in onCreate
|
||||
mBuildLayout = false;
|
||||
|
||||
// Send all information needed to service generate keys in other thread
|
||||
Intent intent = new Intent(this, ApgService.class);
|
||||
intent.putExtra(ApgService.EXTRA_ACTION,
|
||||
@ -298,8 +304,10 @@ public class EditKeyActivity extends SherlockFragmentActivity { // extends BaseA
|
||||
}
|
||||
});
|
||||
|
||||
if (mBuildLayout) {
|
||||
buildLayout();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build layout based on mUserId, mKeys and mKeysUsages Vectors. It creates Views for every user
|
||||
|
Loading…
Reference in New Issue
Block a user