diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.java deleted file mode 100644 index 2ca747f54f..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.java +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.input.model; - -import android.os.Build; -import android.os.Vibrator; -import android.os.VibratorManager; - -import androidx.annotation.NonNull; -import androidx.annotation.RequiresApi; - -@RequiresApi(api = Build.VERSION_CODES.S) -public final class DolphinVibratorManagerPassthrough implements DolphinVibratorManager -{ - private final VibratorManager mVibratorManager; - - public DolphinVibratorManagerPassthrough(@NonNull VibratorManager vibratorManager) - { - mVibratorManager = vibratorManager; - } - - @Override @NonNull - public Vibrator getVibrator(int vibratorId) - { - return mVibratorManager.getVibrator(vibratorId); - } - - @Override @NonNull - public int[] getVibratorIds() - { - return mVibratorManager.getVibratorIds(); - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.kt new file mode 100644 index 0000000000..0895484314 --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinVibratorManagerPassthrough.kt @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +package org.dolphinemu.dolphinemu.features.input.model + +import android.os.Build +import android.os.Vibrator +import android.os.VibratorManager +import androidx.annotation.RequiresApi + +@RequiresApi(api = Build.VERSION_CODES.S) +class DolphinVibratorManagerPassthrough(private val vibratorManager: VibratorManager) : + DolphinVibratorManager { + override fun getVibrator(vibratorId: Int): Vibrator = vibratorManager.getVibrator(vibratorId) + + override fun getVibratorIds(): IntArray = vibratorManager.vibratorIds +}