From b31ab118422ad9ef9887a0f165d95cff34d03316 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 16 May 2023 15:52:22 -0400 Subject: [PATCH] android: Remove unnecessary JvmStatic/JvmField annotations --- .../app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt | 2 -- .../java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt | 2 -- .../yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt | 1 - .../yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt | 1 - .../java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt | 1 - .../src/main/java/org/yuzu/yuzu_emu/utils/DocumentsTree.kt | 1 - .../java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt | 1 - .../app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt | 1 - .../src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt | 1 - src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt | 5 ----- .../app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt | 1 - 11 files changed, 17 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt index 5848c87c1..4c947b786 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt @@ -52,11 +52,9 @@ class YuzuApplication : Application() { } companion object { - @JvmField var documentsTree: DocumentsTree? = null lateinit var application: YuzuApplication - @JvmStatic val appContext: Context get() = application.applicationContext } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index 4a0f88f52..ea4071ba7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -326,14 +326,12 @@ open class EmulationActivity : AppCompatActivity(), SensorEventListener { const val EXTRA_SELECTED_GAME = "SelectedGame" private const val EMULATION_RUNNING_NOTIFICATION = 0x1000 - @JvmStatic fun launch(activity: AppCompatActivity, game: Game) { val launcher = Intent(activity, EmulationActivity::class.java) launcher.putExtra(EXTRA_SELECTED_GAME, game) activity.startActivity(launcher) } - @JvmStatic fun tryDismissRunningNotification(activity: Activity?) { // TODO(bunnei): Disable notifications until we support app suspension. //NotificationManagerCompat.from(activity).cancel(EMULATION_RUNNING_NOTIFICATION); diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt index 691fad44e..aadf273dd 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt @@ -220,7 +220,6 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView { private const val ARG_GAME_ID = "game_id" private const val FRAGMENT_TAG = "settings" - @JvmStatic fun launch(context: Context, menuTag: String?, gameId: String?) { val settings = Intent(context, SettingsActivity::class.java) settings.putExtra(ARG_MENU_TAG, menuTag) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt index 687d06f2f..867147950 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt @@ -110,7 +110,6 @@ class SettingsFragment : Fragment(), SettingsFragmentView { private const val ARGUMENT_MENU_TAG = "menu_tag" private const val ARGUMENT_GAME_ID = "game_id" - @JvmStatic fun newInstance(menuTag: String?, gameId: String?): Fragment { val fragment = SettingsFragment() val arguments = Bundle() diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt index 6cd0e9d1d..36c479e6c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt @@ -12,7 +12,6 @@ object DirectoryInitialization { var areDirectoriesReady: Boolean = false - @JvmStatic fun start(context: Context) { if (!areDirectoriesReady) { initializeInternalStorage(context) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DocumentsTree.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DocumentsTree.kt index 2950021de..cc8ea6b9d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DocumentsTree.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DocumentsTree.kt @@ -103,7 +103,6 @@ class DocumentsTree { } companion object { - @JvmStatic fun isNativePath(path: String): Boolean { return if (path.isNotEmpty()) { path[0] == '/' diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt index 27dbfb9eb..26ea2d77d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/EmulationMenuSettings.kt @@ -34,7 +34,6 @@ object EmulationMenuSettings { .apply() } - @JvmStatic var landscapeScreenLayout: Int get() = preferences.getInt( Settings.PREF_MENU_SETTINGS_LANDSCAPE, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt index 0e3305026..0a7b323b1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt @@ -237,7 +237,6 @@ object FileUtil { return size } - @JvmStatic fun copyUriToInternalStorage( context: Context, sourceUri: Uri?, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt index 23986692a..ed3c0f58e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt @@ -53,7 +53,6 @@ object GpuDriverHelper { zis.closeEntry() } - @JvmStatic fun initializeDriverParameters(context: Context) { try { // Initialize the file redirection directory. diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt index ec08d4a0c..a193e82a4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt @@ -14,31 +14,26 @@ import org.yuzu.yuzu_emu.BuildConfig object Log { private const val TAG = "Yuzu Frontend" - @JvmStatic fun verbose(message: String) { if (BuildConfig.DEBUG) { Log.v(TAG, message) } } - @JvmStatic fun debug(message: String) { if (BuildConfig.DEBUG) { Log.d(TAG, message) } } - @JvmStatic fun info(message: String) { Log.i(TAG, message) } - @JvmStatic fun warning(message: String) { Log.w(TAG, message) } - @JvmStatic fun error(message: String) { Log.e(TAG, message) } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt index 1a9495ea7..e55767c0f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeHelper.kt @@ -25,7 +25,6 @@ object ThemeHelper { private const val DEFAULT = 0 private const val MATERIAL_YOU = 1 - @JvmStatic fun setTheme(activity: AppCompatActivity) { val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) setThemeMode(activity)