diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.java deleted file mode 100644 index c83d4e292e..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.java +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.settings.model.view; - -import android.content.Context; - -import org.dolphinemu.dolphinemu.NativeLibrary; -import org.dolphinemu.dolphinemu.features.settings.model.AbstractSetting; - -public final class RunRunnable extends SettingsItem -{ - private final int mAlertText; - private final int mToastTextAfterRun; - private final boolean mWorksDuringEmulation; - private final Runnable mRunnable; - - public RunRunnable(Context context, int titleId, int descriptionId, int alertText, - int toastTextAfterRun, boolean worksDuringEmulation, Runnable runnable) - { - super(context, titleId, descriptionId); - mAlertText = alertText; - mToastTextAfterRun = toastTextAfterRun; - mWorksDuringEmulation = worksDuringEmulation; - mRunnable = runnable; - } - - public int getAlertText() - { - return mAlertText; - } - - public int getToastTextAfterRun() - { - return mToastTextAfterRun; - } - - public Runnable getRunnable() - { - return mRunnable; - } - - @Override - public int getType() - { - return TYPE_RUN_RUNNABLE; - } - - @Override - public AbstractSetting getSetting() - { - return null; - } - - @Override - public boolean isEditable() - { - return mWorksDuringEmulation || !NativeLibrary.IsRunning(); - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.kt new file mode 100644 index 0000000000..f9d5786e22 --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/RunRunnable.kt @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +package org.dolphinemu.dolphinemu.features.settings.model.view + +import android.content.Context +import org.dolphinemu.dolphinemu.NativeLibrary +import org.dolphinemu.dolphinemu.features.settings.model.AbstractSetting + +class RunRunnable( + context: Context, + titleId: Int, + descriptionId: Int, + val alertText: Int, + val toastTextAfterRun: Int, + private val worksDuringEmulation: Boolean, + val runnable: Runnable +) : SettingsItem(context, titleId, descriptionId) { + override val type: Int = TYPE_RUN_RUNNABLE + + override val setting: AbstractSetting? = null + + override val isEditable: Boolean + get() = worksDuringEmulation || !NativeLibrary.IsRunning() +}