FAndroidMisc::FileExistsInPlatformPackage() got lost in the engine merge - restore it. Also fix spelling.

This should fix Android Test/Ship builds not being able to find BuildInfo.ini
[REVIEW] [at]Thomas.Ross

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 9421954 via CL 9421961 via CL 9421965 via CL 9421969 via CL 9422791 via CL 9423126
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) (v495-9448618)

[CL 9449134 by justin marcus in Dev-Networking branch]
This commit is contained in:
justin marcus
2019-10-07 12:42:51 -04:00
6 changed files with 19 additions and 4 deletions

View File

@@ -1135,6 +1135,20 @@ FString FAndroidMisc::LoadTextFileFromPlatformPackage(const FString& RelativePat
return FString();
}
bool FAndroidMisc::FileExistsInPlatformPackage(const FString& RelativePath)
{
#if USE_ANDROID_JNI
AAssetManager* AssetMgr = AndroidThunkCpp_GetAssetManager();
AAsset* asset = AAssetManager_open(AssetMgr, TCHAR_TO_UTF8(*RelativePath), AASSET_MODE_UNKNOWN);
if (asset)
{
AAsset_close(asset);
return true;
}
#endif
return false;
}
void FAndroidMisc::SetVersionInfo( FString InAndroidVersion, FString InDeviceMake, FString InDeviceModel, FString InDeviceBuildNumber, FString InOSLanguage )
{
AndroidVersion = InAndroidVersion;

View File

@@ -1372,7 +1372,7 @@ FString FGenericPlatformMisc::LoadTextFileFromPlatformPackage(const FString& Rel
return Result;
}
bool FGenericPlatformMisc::FileExitsInPlatformPackage(const FString& RelativePath)
bool FGenericPlatformMisc::FileExistsInPlatformPackage(const FString& RelativePath)
{
FString Path = RootDir() / RelativePath;
return IFileManager::Get().FileExists(*Path);

View File

@@ -1115,7 +1115,7 @@ FString FIOSPlatformMisc::LoadTextFileFromPlatformPackage(const FString& Relativ
return FString(UTF8_TO_TCHAR(FileContents.GetData()));
}
bool FIOSPlatformMisc::FileExitsInPlatformPackage(const FString& RelativePath)
bool FIOSPlatformMisc::FileExistsInPlatformPackage(const FString& RelativePath)
{
FString FilePath = FString([[NSBundle mainBundle] bundlePath]) / RelativePath;

View File

@@ -160,6 +160,7 @@ public:
static void ShareURL(const FString& URL, const FText& Description, int32 LocationHintX, int32 LocationHintY);
static FString LoadTextFileFromPlatformPackage(const FString& RelativePath);
static bool FileExistsInPlatformPackage(const FString& RelativePath);
// ANDROID ONLY:
static void SetVersionInfo(FString AndroidVersion, FString DeviceMake, FString DeviceModel, FString DeviceBuildNumber, FString OSLanguage);

View File

@@ -1381,7 +1381,7 @@ public:
*/
static FString LoadTextFileFromPlatformPackage(const FString& RelativePath);
static bool FileExitsInPlatformPackage(const FString& RelativePath);
static bool FileExistsInPlatformPackage(const FString& RelativePath);
/**
* Frees any memory retained by FGenericPlatformMisc.

View File

@@ -79,7 +79,7 @@ struct CORE_API FIOSPlatformMisc : public FApplePlatformMisc
static void ShareURL(const FString& URL, const FText& Description, int32 LocationHintX, int32 LocationHintY);
static FString LoadTextFileFromPlatformPackage(const FString& RelativePath);
static bool FileExitsInPlatformPackage(const FString& RelativePath);
static bool FileExistsInPlatformPackage(const FString& RelativePath);
static void EnableVoiceChat(bool bEnable);
static bool IsVoiceChatEnabled();