Fix low hanging detekt violations
This commit is contained in:
parent
85509abc68
commit
012c8bd3b4
4 changed files with 10 additions and 5 deletions
|
@ -38,7 +38,9 @@ class RealOAuth2TokenProvider(
|
|||
val oldAccessToken = authState.accessToken
|
||||
|
||||
try {
|
||||
authState.performActionWithFreshTokens(authService) { accessToken: String?, _, authException: AuthorizationException? ->
|
||||
authState.performActionWithFreshTokens(
|
||||
authService,
|
||||
) { accessToken: String?, _, authException: AuthorizationException? ->
|
||||
token = accessToken
|
||||
exception = authException
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.os.Build
|
|||
|
||||
object PendingIntentCompat {
|
||||
@JvmField
|
||||
val FLAG_IMMUTABLE = if (Build.VERSION.SDK_INT >= 23) PendingIntent.FLAG_IMMUTABLE else 0
|
||||
val FLAG_IMMUTABLE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) PendingIntent.FLAG_IMMUTABLE else 0
|
||||
|
||||
@JvmField
|
||||
val FLAG_MUTABLE = if (Build.VERSION.SDK_INT >= 31) PendingIntent.FLAG_MUTABLE else 0
|
||||
val FLAG_MUTABLE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0
|
||||
}
|
||||
|
|
|
@ -274,7 +274,8 @@ class HtmlSanitizerTest {
|
|||
|
||||
val result = htmlSanitizer.sanitize(html)
|
||||
|
||||
assertThat(result.toCompactString()).isEqualTo("<html><head><style>keep this</style></head><body></body></html>")
|
||||
assertThat(result.toCompactString())
|
||||
.isEqualTo("<html><head><style>keep this</style></head><body></body></html>")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -38,7 +38,9 @@ class RealOAuth2TokenProvider(
|
|||
val oldAccessToken = authState.accessToken
|
||||
|
||||
try {
|
||||
authState.performActionWithFreshTokens(authService) { accessToken: String?, _, authException: AuthorizationException? ->
|
||||
authState.performActionWithFreshTokens(
|
||||
authService,
|
||||
) { accessToken: String?, _, authException: AuthorizationException? ->
|
||||
token = accessToken
|
||||
exception = authException
|
||||
|
||||
|
|
Loading…
Reference in a new issue