summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java
diff options
context:
space:
mode:
authorSimonx22 <simon@oatmealdome.me>2026-03-24 18:10:24 -0400
committerSimonx22 <simon@oatmealdome.me>2026-03-24 18:42:19 -0400
commit9085d649dc8fb4c288a84e61387dc9503ada80d9 (patch)
tree59f6a0e6d0625907880a96781df7f06869b8b16f /Source/Android/app/src/main/java
parentcfa6ec806e00434365e186c248c7785d0eda17d5 (diff)
Android: Add Keep annotation to JNI-exposed PermissionsHandler methods
This fixes an oversight from https://github.com/dolphin-emu/dolphin/pull/14488 where I forgot to add `@Keep` to JNI-exposed methods. R8 tried to optimize it and thought those methods were unused.
Diffstat (limited to 'Source/Android/app/src/main/java')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.kt
index 56cee4fc59..192309625b 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.kt
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.kt
@@ -8,6 +8,7 @@ import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.os.Environment
+import androidx.annotation.Keep
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity
import org.dolphinemu.dolphinemu.DolphinApplication
@@ -54,6 +55,7 @@ object PermissionsHandler {
}
@JvmStatic
+ @Keep
fun hasRecordAudioPermission(context: Context?): Boolean {
val nonNullContext = context ?: DolphinApplication.getAppContext()
val hasRecordPermission =
@@ -62,6 +64,7 @@ object PermissionsHandler {
}
@JvmStatic
+ @Keep
fun requestRecordAudioPermission(activity: Activity?) {
val targetActivity = activity ?: DolphinApplication.getAppActivity()!!
if (activity == null) {