summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.java22
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.kt15
2 files changed, 15 insertions, 22 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.java
deleted file mode 100644
index 62c9b018a..000000000
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.yuzu.yuzu_emu.utils;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-import org.yuzu.yuzu_emu.utils.DirectoryInitialization.DirectoryInitializationState;
-
-public class DirectoryStateReceiver extends BroadcastReceiver {
- Action1<DirectoryInitializationState> callback;
-
- public DirectoryStateReceiver(Action1<DirectoryInitializationState> callback) {
- this.callback = callback;
- }
-
- @Override
- public void onReceive(Context context, Intent intent) {
- DirectoryInitializationState state = (DirectoryInitializationState) intent
- .getSerializableExtra(DirectoryInitialization.EXTRA_STATE);
- callback.call(state);
- }
-}
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.kt
new file mode 100644
index 000000000..20906941a
--- /dev/null
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryStateReceiver.kt
@@ -0,0 +1,15 @@
+package org.yuzu.yuzu_emu.utils
+
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import org.yuzu.yuzu_emu.utils.DirectoryInitialization.DirectoryInitializationState
+
+class DirectoryStateReceiver(var callback: (DirectoryInitializationState) -> Unit) :
+ BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ val state = intent
+ .getSerializableExtra(DirectoryInitialization.EXTRA_STATE) as DirectoryInitializationState
+ callback.invoke(state)
+ }
+}