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<PGPSecretKey> mKeys;
|
||||||
Vector<Integer> mKeysUsages;
|
Vector<Integer> mKeysUsages;
|
||||||
|
|
||||||
|
// will be set to true to build layout later in handler
|
||||||
|
private boolean mBuildLayout = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
menu.add(1, Id.menu.option.cancel, 0, R.string.btn_doNotSave).setShowAsAction(
|
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);
|
.getBoolean(Apg.EXTRA_GENERATE_DEFAULT_KEYS);
|
||||||
if (generateDefaultKeys) {
|
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
|
// Send all information needed to service generate keys in other thread
|
||||||
Intent intent = new Intent(this, ApgService.class);
|
Intent intent = new Intent(this, ApgService.class);
|
||||||
intent.putExtra(ApgService.EXTRA_ACTION,
|
intent.putExtra(ApgService.EXTRA_ACTION,
|
||||||
@ -298,7 +304,9 @@ public class EditKeyActivity extends SherlockFragmentActivity { // extends BaseA
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
buildLayout();
|
if (mBuildLayout) {
|
||||||
|
buildLayout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user