Skip to content

Commit

Permalink
Remove redundant suppressions
Browse files Browse the repository at this point in the history
Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Jun 6, 2024
1 parent 432971b commit ab746ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ open class ConnectionWebViewClient(
}

// This is called on older Android versions
@Deprecated("Deprecated in Java")
override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
if (url == EMPTY_PAGE || view.url == EMPTY_PAGE) {
Log.d(TAG, "Either current or new page is '$EMPTY_PAGE'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class RecyclerViewSwipeRefreshLayout(context: Context, attrs: AttributeSet) : Sw

override fun setNestedScrollingEnabled(enabled: Boolean) {
// This method is called from the super constructor, where the helper isn't initialized yet
@Suppress("UNNECESSARY_SAFE_CALL", "SAFE_CALL_WILL_CHANGE_NULLABILITY")
@Suppress("UNNECESSARY_SAFE_CALL")
nestedScrollingChildHelper?.isNestedScrollingEnabled = enabled
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,10 @@ fun Menu.getGroupItems(groupId: Int): List<MenuItem> {
fun PackageManager.isInstalled(app: String): Boolean {
return try {
// Some devices return `null` for getApplicationInfo()
@Suppress("UNNECESSARY_SAFE_CALL", "SAFE_CALL_WILL_CHANGE_NULLABILITY", "SimplifyBooleanWithConstants")
@Suppress("UNNECESSARY_SAFE_CALL")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getApplicationInfo(app, PackageManager.ApplicationInfoFlags.of(0))?.enabled == true
} else {
@Suppress("DEPRECATION")
getApplicationInfo(app, 0)?.enabled == true
}
} catch (e: PackageManager.NameNotFoundException) {
Expand Down

0 comments on commit ab746ec

Please sign in to comment.