mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
correctly preserve state in EncryptTextFragment
This commit is contained in:
parent
56a75774d0
commit
426d17bd0a
@ -56,9 +56,10 @@ import java.util.Set;
|
|||||||
public class EncryptTextFragment extends CryptoOperationFragment {
|
public class EncryptTextFragment extends CryptoOperationFragment {
|
||||||
|
|
||||||
public static final String ARG_TEXT = "text";
|
public static final String ARG_TEXT = "text";
|
||||||
|
public static final String ARG_USE_COMPRESSION = "use_compression";
|
||||||
|
|
||||||
private boolean mShareAfterEncrypt = false;
|
private boolean mShareAfterEncrypt;
|
||||||
private boolean mUseCompression = true;
|
private boolean mUseCompression;
|
||||||
private boolean mHiddenRecipients = false;
|
private boolean mHiddenRecipients = false;
|
||||||
|
|
||||||
private String mMessage = "";
|
private String mMessage = "";
|
||||||
@ -117,10 +118,21 @@ public class EncryptTextFragment extends CryptoOperationFragment {
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
outState.putBoolean(ARG_USE_COMPRESSION, mUseCompression);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mMessage = getArguments().getString(ARG_TEXT);
|
if (savedInstanceState == null) {
|
||||||
|
mMessage = getArguments().getString(ARG_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bundle args = savedInstanceState == null ? getArguments() : savedInstanceState;
|
||||||
|
mUseCompression = args.getBoolean(ARG_USE_COMPRESSION, true);
|
||||||
|
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user