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-SOURCE: CL 9422686 via CL 9422692 via CL 9422694 via CL 9422697 via CL 9422863
#ROBOMERGE-BOT: (v480-9420520)

[CL 9423831 by justin marcus in Main branch]
This commit is contained in:
justin marcus
2019-10-04 17:41:42 -04:00
parent ddc503c1e7
commit f46ca568ee
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();