[Android] Add missing conditionals

This commit is contained in:
David Oliver 2019-05-23 14:48:21 -04:00 committed by Jérôme Laban
commit 5f61812b7f
2 changed files with 3 additions and 3 deletions

View file

@ -306,7 +306,7 @@ namespace CalculationManager
internal static IntPtr StringToHGlobal(string resourceValue) internal static IntPtr StringToHGlobal(string resourceValue)
{ {
#if __WASM__ || __IOS__ #if __WASM__ || __IOS__ || __ANDROID__
// wchar_t is 32bits // wchar_t is 32bits
return StringToHGlobalUTF32(resourceValue); return StringToHGlobalUTF32(resourceValue);
#else #else
@ -316,7 +316,7 @@ namespace CalculationManager
internal static string PtrToString(IntPtr pResourceId) internal static string PtrToString(IntPtr pResourceId)
{ {
#if __WASM__ || __IOS__ #if __WASM__ || __IOS__ || __ANDROID__
return PtrToStringUTF32(pResourceId); return PtrToStringUTF32(pResourceId);
#else #else
return Marshal.PtrToStringUni(pResourceId); return Marshal.PtrToStringUni(pResourceId);

View file

@ -574,7 +574,7 @@ namespace CalculatorApp.ViewModel
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator(); m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
#if !__WASM__ && !__IOS__ #if !__WASM__ && !__IOS__ && !__ANDROID__
if (CoreWindow.GetForCurrentThread() != null) if (CoreWindow.GetForCurrentThread() != null)
{ {
// Must have a CoreWindow to access the resource context. // Must have a CoreWindow to access the resource context.