quick android conditionals
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user