mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-24 15:24:37 -05:00
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.
This commit is contained in:
parent
cfa6ec806e
commit
9085d649dc
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user