DroidFish: Fixed intent handling in low memory situations.

Lifecycle handling was wrong, causing the received activity intent to be
reprocessed if the activity was recreated after a previous low memory
situation.

This problem could be triggered by enabling "Don't keep activities" in
developer options and sending a pgn file intent to DroidFish.
This commit is contained in:
Peter Osterlund 2016-12-19 21:40:30 +01:00
parent ea1788bcdb
commit 97160698a9

View File

@ -452,9 +452,13 @@ public class DroidFish extends Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Pair<String,String> pair = getPgnOrFenIntent();
String intentPgnOrFen = pair.first;
String intentFilename = pair.second;
String intentPgnOrFen = null;
String intentFilename = null;
if (savedInstanceState == null) {
Pair<String,String> pair = getPgnOrFenIntent();
intentPgnOrFen = pair.first;
intentFilename = pair.second;
}
createDirectories();