diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-03-30 15:04:25 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-03-30 15:07:45 +0200 |
commit | 354e1c0ed93f0c90aa83b1789daa9d861c8b7cca (patch) | |
tree | b9da817b631f3f1b52a6a501dc9e9594185e8e46 /ui/src/main | |
parent | 02b9677a9cf5b2c8e8c31b0974829a3ffb986c6f (diff) |
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>
Diffstat (limited to 'ui/src/main')
3 files changed, 1 insertions, 8 deletions
diff --git a/ui/src/main/java/com/wireguard/android/Application.kt b/ui/src/main/java/com/wireguard/android/Application.kt index 44199d9d..928ee346 100644 --- a/ui/src/main/java/com/wireguard/android/Application.kt +++ b/ui/src/main/java/com/wireguard/android/Application.kt @@ -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 } diff --git a/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt index 627a9728..42cea1bc 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt @@ -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) diff --git a/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt index 97f2ec73..5fa7297b 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt @@ -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) |