Add launch image support for Android (disabled for GearVR)

#ue4
#android

[CL 2673367 by Chris Babcock in Main branch]
This commit is contained in:
Chris Babcock
2015-08-28 19:34:42 -04:00
committed by Chris.Babcock@epicgames.com
parent 75470bedd6
commit a939d907d6
18 changed files with 443 additions and 35 deletions
@@ -53,7 +53,7 @@ void FJavaWrapper::FindClassesAndMethods(JNIEnv* Env)
AndroidThunkJava_KeepScreenOn = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_KeepScreenOn", "(Z)V", bIsOptional);
AndroidThunkJava_InitHMDs = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_InitHMDs", "()V", bIsOptional);
AndroidThunkJava_IsGearVRApplication = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_IsGearVRApplication", "()Z", bIsOptional);
AndroidThunkJava_DismissSplashScreen = FindMethod(Env, GameActivityClassID, "AndroidThunkJava_DismissSplashScreen", "()V", bIsOptional);
// the rest are optional
bIsOptional = true;
@@ -159,6 +159,7 @@ jmethodID FJavaWrapper::AndroidThunkJava_IsMusicActive;
jmethodID FJavaWrapper::AndroidThunkJava_KeepScreenOn;
jmethodID FJavaWrapper::AndroidThunkJava_InitHMDs;
jmethodID FJavaWrapper::AndroidThunkJava_IsGearVRApplication;
jmethodID FJavaWrapper::AndroidThunkJava_DismissSplashScreen;
jclass FJavaWrapper::GoogleServicesClassID;
jobject FJavaWrapper::GoogleServicesThis;
@@ -232,6 +233,14 @@ bool AndroidThunkCpp_IsGearVRApplication()
return bIsGearVRApplication;
}
void AndroidThunkCpp_DismissSplashScreen()
{
if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())
{
FJavaWrapper::CallVoidMethod(Env, FJavaWrapper::GameActivityThis, FJavaWrapper::AndroidThunkJava_DismissSplashScreen);
}
}
void AndroidThunkCpp_ShowConsoleWindow()
{
if (JNIEnv* Env = FAndroidApplication::GetJavaEnv())