ui: remove unneeded @JvmStatic annotations

These are only needed on methods called from databindings, since those
compile to java.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-03-30 15:04:25 +02:00
parent 02b9677a9c
commit 354e1c0ed9
3 changed files with 1 additions and 8 deletions

View File

@ -125,27 +125,20 @@ class Application : android.app.Application() {
private const val TAG = "WireGuard/Application"
private lateinit var weakSelf: WeakReference<Application>
@JvmStatic
fun get(): Application {
return weakSelf.get()!!
}
@JvmStatic
suspend fun getBackend() = get().futureBackend.await()
@JvmStatic
fun getRootShell() = get().rootShell
@JvmStatic
fun getPreferencesDataStore() = get().preferencesDataStore
@JvmStatic
fun getToolsInstaller() = get().toolsInstaller
@JvmStatic
fun getTunnelManager() = get().tunnelManager
@JvmStatic
fun getCoroutineScope() = get().coroutineScope
}

View File

@ -154,6 +154,7 @@ class AppListDialogFragment : DialogFragment() {
const val KEY_SELECTED_APPS = "selected_apps"
const val KEY_IS_EXCLUDED = "is_excluded"
const val REQUEST_SELECTION = "request_selection"
fun newInstance(selectedApps: ArrayList<String?>?, isExcluded: Boolean): AppListDialogFragment {
val extras = Bundle()
extras.putStringArrayList(KEY_SELECTED_APPS, selectedApps)

View File

@ -70,7 +70,6 @@ class ConfigNamingDialogFragment : DialogFragment() {
companion object {
private const val KEY_CONFIG_TEXT = "config_text"
@JvmStatic
fun newInstance(configText: String?): ConfigNamingDialogFragment {
val extras = Bundle()
extras.putString(KEY_CONFIG_TEXT, configText)