UE-64624 App fails to open when packaged for Distribution - Android

#jira UE-64624
#Android
#4.21
#rb Jack.Porter
As Chris.Babcock mentioned, this is caused by an app pause event triggered when the obb downloader starts and puts the activity in background. Adding a flag to ignore the first app pause in this situation.

#ROBOMERGE-SOURCE: CL 4437615 in //UE4/Release-4.21/...
#ROBOMERGE-BOT: RELEASE (Release-4.21 -> Release-Staging-4.21)

[CL 4437622 by sorin gradinaru in Staging-4.21 branch]
This commit is contained in:
sorin gradinaru
2018-10-08 16:47:40 -04:00
parent 4a00da6612
commit 3ad9412509
2 changed files with 23 additions and 1 deletions
@@ -2790,6 +2790,8 @@ public class GameActivity extends NativeActivity implements SurfaceHolder.Callba
}
else
{
nativeOnInitialDownloadStarted();
// Post the check activity handler here to run after onResume completes
Log.debug("==============> Posting request for downloader activity");
final Handler downloadHandler = new Handler();
@@ -4014,6 +4016,8 @@ public class GameActivity extends NativeActivity implements SurfaceHolder.Callba
errorCode = DOWNLOAD_USER_QUIT;
}
nativeOnInitialDownloadCompleted();
HasAllFiles = (errorCode == DOWNLOAD_FILES_PRESENT || errorCode == DOWNLOAD_COMPLETED_OK);
if(errorCode == DOWNLOAD_NO_RETURN_CODE
@@ -5395,6 +5399,9 @@ public class GameActivity extends NativeActivity implements SurfaceHolder.Callba
public native void nativeOnConfigurationChanged(boolean bPortrait);
public native void nativeOnInitialDownloadStarted();
public native void nativeOnInitialDownloadCompleted();
static
{
System.loadLibrary("gnustl_shared");