Add deprecation messages for newly added Kotlin migrations

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-12-29 19:39:17 +01:00
parent 9ade74ea95
commit 4574024aae
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
5 changed files with 22 additions and 0 deletions

View file

@ -208,6 +208,7 @@ class IncomingLocationMessageViewHolder(incomingView: View, payload: Any) : Mess
binding.webview.settings?.javaScriptEnabled = true
binding.webview.webViewClient = object : WebViewClient() {
@Deprecated("Use shouldOverrideUrlLoading(WebView view, WebResourceRequest request)")
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
return if (url != null && UriUtils.hasHttpProtocollPrefixed(url)
) {

View file

@ -161,6 +161,7 @@ class OutcomingLocationMessageViewHolder(incomingView: View) : MessageHolders
binding.webview.settings?.javaScriptEnabled = true
binding.webview.webViewClient = object : WebViewClient() {
@Deprecated("Use shouldOverrideUrlLoading(WebView view, WebResourceRequest request)")
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
return if (url != null && UriUtils.hasHttpProtocollPrefixed(url)
) {

View file

@ -213,6 +213,23 @@ import java.util.Locale
import java.util.Objects
import java.util.concurrent.ExecutionException
import javax.inject.Inject
import kotlin.collections.ArrayList
import kotlin.collections.HashMap
import kotlin.collections.LinkedHashMap
import kotlin.collections.List
import kotlin.collections.MutableList
import kotlin.collections.MutableMap
import kotlin.collections.chunked
import kotlin.collections.indexOfFirst
import kotlin.collections.indices
import kotlin.collections.isNotEmpty
import kotlin.collections.iterator
import kotlin.collections.map
import kotlin.collections.set
import kotlin.collections.toList
import kotlin.collections.toMap
import kotlin.collections.toMutableMap
import kotlin.collections.toTypedArray
import kotlin.math.roundToInt
@AutoInjector(NextcloudTalkApplication::class)

View file

@ -529,6 +529,7 @@ class LocationPickerController(args: Bundle) :
myLocation = GeoPoint(location)
}
@Deprecated("Deprecated. This callback will never be invoked on Android Q and above.")
override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) {
// empty
}

View file

@ -167,6 +167,7 @@ class WebViewLoginController(args: Bundle? = null) : BaseController(
webViewFidoBridge?.delegateOnPageStarted(view, url, favicon)
}
@Deprecated("Use shouldOverrideUrlLoading(WebView view, WebResourceRequest request)")
override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
if (url.startsWith(assembledPrefix!!)) {
parseAndLoginFromWebView(url)
@ -302,6 +303,7 @@ class WebViewLoginController(args: Bundle? = null) : BaseController(
}
}
@Deprecated("Deprecated in super implementation")
override fun onReceivedError(view: WebView, errorCode: Int, description: String, failingUrl: String) {
super.onReceivedError(view, errorCode, description, failingUrl)
}