Merge pull request #5319 from volzhs/android-new-intent

correct current Intent for android
This commit is contained in:
Rémi Verschelde 2016-06-21 12:01:47 +02:00 committed by GitHub
commit b7b547a191
1 changed files with 13 additions and 1 deletions

View File

@ -115,7 +115,17 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
private int mState;
private boolean keep_screen_on=true;
private void setState(int newState) {
static private Intent mCurrentIntent;
@Override public void onNewIntent(Intent intent) {
mCurrentIntent = intent;
}
static public Intent getCurrentIntent() {
return mCurrentIntent;
}
private void setState(int newState) {
if (mState != newState) {
mState = newState;
mStatusText.setText(Helpers.getDownloaderStringResourceIDFromState(newState));
@ -545,6 +555,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
}
mCurrentIntent = getIntent();
initializeGodot();