mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
android: Remove unnecessary JvmStatic/JvmField annotations
This commit is contained in:
parent
8d3288b6ff
commit
b31ab11842
|
@ -52,11 +52,9 @@ class YuzuApplication : Application() {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmField
|
|
||||||
var documentsTree: DocumentsTree? = null
|
var documentsTree: DocumentsTree? = null
|
||||||
lateinit var application: YuzuApplication
|
lateinit var application: YuzuApplication
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
val appContext: Context
|
val appContext: Context
|
||||||
get() = application.applicationContext
|
get() = application.applicationContext
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,14 +326,12 @@ open class EmulationActivity : AppCompatActivity(), SensorEventListener {
|
||||||
const val EXTRA_SELECTED_GAME = "SelectedGame"
|
const val EXTRA_SELECTED_GAME = "SelectedGame"
|
||||||
private const val EMULATION_RUNNING_NOTIFICATION = 0x1000
|
private const val EMULATION_RUNNING_NOTIFICATION = 0x1000
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun launch(activity: AppCompatActivity, game: Game) {
|
fun launch(activity: AppCompatActivity, game: Game) {
|
||||||
val launcher = Intent(activity, EmulationActivity::class.java)
|
val launcher = Intent(activity, EmulationActivity::class.java)
|
||||||
launcher.putExtra(EXTRA_SELECTED_GAME, game)
|
launcher.putExtra(EXTRA_SELECTED_GAME, game)
|
||||||
activity.startActivity(launcher)
|
activity.startActivity(launcher)
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun tryDismissRunningNotification(activity: Activity?) {
|
fun tryDismissRunningNotification(activity: Activity?) {
|
||||||
// TODO(bunnei): Disable notifications until we support app suspension.
|
// TODO(bunnei): Disable notifications until we support app suspension.
|
||||||
//NotificationManagerCompat.from(activity).cancel(EMULATION_RUNNING_NOTIFICATION);
|
//NotificationManagerCompat.from(activity).cancel(EMULATION_RUNNING_NOTIFICATION);
|
||||||
|
|
|
@ -220,7 +220,6 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
|
||||||
private const val ARG_GAME_ID = "game_id"
|
private const val ARG_GAME_ID = "game_id"
|
||||||
private const val FRAGMENT_TAG = "settings"
|
private const val FRAGMENT_TAG = "settings"
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun launch(context: Context, menuTag: String?, gameId: String?) {
|
fun launch(context: Context, menuTag: String?, gameId: String?) {
|
||||||
val settings = Intent(context, SettingsActivity::class.java)
|
val settings = Intent(context, SettingsActivity::class.java)
|
||||||
settings.putExtra(ARG_MENU_TAG, menuTag)
|
settings.putExtra(ARG_MENU_TAG, menuTag)
|
||||||
|
|
|
@ -110,7 +110,6 @@ class SettingsFragment : Fragment(), SettingsFragmentView {
|
||||||
private const val ARGUMENT_MENU_TAG = "menu_tag"
|
private const val ARGUMENT_MENU_TAG = "menu_tag"
|
||||||
private const val ARGUMENT_GAME_ID = "game_id"
|
private const val ARGUMENT_GAME_ID = "game_id"
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(menuTag: String?, gameId: String?): Fragment {
|
fun newInstance(menuTag: String?, gameId: String?): Fragment {
|
||||||
val fragment = SettingsFragment()
|
val fragment = SettingsFragment()
|
||||||
val arguments = Bundle()
|
val arguments = Bundle()
|
||||||
|
|
|
@ -12,7 +12,6 @@ object DirectoryInitialization {
|
||||||
|
|
||||||
var areDirectoriesReady: Boolean = false
|
var areDirectoriesReady: Boolean = false
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Context) {
|
fun start(context: Context) {
|
||||||
if (!areDirectoriesReady) {
|
if (!areDirectoriesReady) {
|
||||||
initializeInternalStorage(context)
|
initializeInternalStorage(context)
|
||||||
|
|
|
@ -103,7 +103,6 @@ class DocumentsTree {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
|
||||||
fun isNativePath(path: String): Boolean {
|
fun isNativePath(path: String): Boolean {
|
||||||
return if (path.isNotEmpty()) {
|
return if (path.isNotEmpty()) {
|
||||||
path[0] == '/'
|
path[0] == '/'
|
||||||
|
|
|
@ -34,7 +34,6 @@ object EmulationMenuSettings {
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
var landscapeScreenLayout: Int
|
var landscapeScreenLayout: Int
|
||||||
get() = preferences.getInt(
|
get() = preferences.getInt(
|
||||||
Settings.PREF_MENU_SETTINGS_LANDSCAPE,
|
Settings.PREF_MENU_SETTINGS_LANDSCAPE,
|
||||||
|
|
|
@ -237,7 +237,6 @@ object FileUtil {
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun copyUriToInternalStorage(
|
fun copyUriToInternalStorage(
|
||||||
context: Context,
|
context: Context,
|
||||||
sourceUri: Uri?,
|
sourceUri: Uri?,
|
||||||
|
|
|
@ -53,7 +53,6 @@ object GpuDriverHelper {
|
||||||
zis.closeEntry()
|
zis.closeEntry()
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun initializeDriverParameters(context: Context) {
|
fun initializeDriverParameters(context: Context) {
|
||||||
try {
|
try {
|
||||||
// Initialize the file redirection directory.
|
// Initialize the file redirection directory.
|
||||||
|
|
|
@ -14,31 +14,26 @@ import org.yuzu.yuzu_emu.BuildConfig
|
||||||
object Log {
|
object Log {
|
||||||
private const val TAG = "Yuzu Frontend"
|
private const val TAG = "Yuzu Frontend"
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun verbose(message: String) {
|
fun verbose(message: String) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
Log.v(TAG, message)
|
Log.v(TAG, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun debug(message: String) {
|
fun debug(message: String) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
Log.d(TAG, message)
|
Log.d(TAG, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun info(message: String) {
|
fun info(message: String) {
|
||||||
Log.i(TAG, message)
|
Log.i(TAG, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun warning(message: String) {
|
fun warning(message: String) {
|
||||||
Log.w(TAG, message)
|
Log.w(TAG, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun error(message: String) {
|
fun error(message: String) {
|
||||||
Log.e(TAG, message)
|
Log.e(TAG, message)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ object ThemeHelper {
|
||||||
private const val DEFAULT = 0
|
private const val DEFAULT = 0
|
||||||
private const val MATERIAL_YOU = 1
|
private const val MATERIAL_YOU = 1
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun setTheme(activity: AppCompatActivity) {
|
fun setTheme(activity: AppCompatActivity) {
|
||||||
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||||
setThemeMode(activity)
|
setThemeMode(activity)
|
||||||
|
|
Loading…
Reference in a new issue