quick android conditionals

This commit is contained in:
Cameron Taylor
2025-07-14 14:45:06 -04:00
parent dd104365e7
commit 01fad012f2
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -9,6 +9,7 @@ import flixel.util.FlxSignal;
@:unreflective
class CallbackUtil
{
#if android
/**
* The result code for `DATA_FOLDER_CLOSED` activity.
*/
@@ -41,6 +42,7 @@ class CallbackUtil
initCallBackJNI(new CallbackHandler());
}
}
#end
}
/**
@@ -48,6 +50,7 @@ class CallbackUtil
*/
class CallbackHandler #if (lime >= "8.0.0") implements JNISafety #end
{
#if android
@:allow(funkin.mobile.external.android.CallbackUtil)
function new():Void {}
@@ -65,4 +68,5 @@ class CallbackHandler #if (lime >= "8.0.0") implements JNISafety #end
{
if (CallbackUtil.onActivityResult != null) CallbackUtil.onActivityResult.dispatch(requestCode, resultCode);
}
#end
}
@@ -6,6 +6,7 @@ package funkin.mobile.external.android;
@:unreflective
class DataFolderUtil
{
#if android
/**
* Opens the data folder on an Android device using JNI.
*/
@@ -18,4 +19,5 @@ class DataFolderUtil
openDataFolderJNI(CallbackUtil.DATA_FOLDER_CLOSED);
}
}
#end
}
+2
View File
@@ -9,6 +9,7 @@ import lime.system.JNI;
@:unreflective
class ScreenUtil
{
#if android
/**
* Retrieves the dimensions of display cutouts (such as notches) on Android devices.
*
@@ -47,4 +48,5 @@ class ScreenUtil
return [];
}
#end
}