瀏覽代碼

suppress some detekt warnings

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 2 年之前
父節點
當前提交
3729f1130a

+ 2 - 0
app/src/main/java/com/nextcloud/talk/activities/CallNotificationActivity.kt

@@ -297,6 +297,7 @@ class CallNotificationActivity : CallBaseActivity() {
         return PendingIntent.getActivity(context, requestCode, intent, intentFlag)
         return PendingIntent.getActivity(context, requestCode, intent, intentFlag)
     }
     }
 
 
+    @Suppress("MagicNumber")
     private fun handleFromNotification() {
     private fun handleFromNotification() {
         val apiVersion = ApiUtils.getConversationApiVersion(
         val apiVersion = ApiUtils.getConversationApiVersion(
             userBeingCalled,
             userBeingCalled,
@@ -363,6 +364,7 @@ class CallNotificationActivity : CallBaseActivity() {
         showAnswerControls()
         showAnswerControls()
     }
     }
 
 
+    @Suppress("MagicNumber")
     private fun setAvatarForOneToOneCall() {
     private fun setAvatarForOneToOneCall() {
         val imageRequest = DisplayUtils.getImageRequestForUrl(
         val imageRequest = DisplayUtils.getImageRequestForUrl(
             ApiUtils.getUrlForAvatar(
             ApiUtils.getUrlForAvatar(

+ 2 - 0
app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt

@@ -274,6 +274,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
         )
         )
     }
     }
 
 
+    @Suppress("TooGenericExceptionCaught", "NestedBlockDepth", "ComplexMethod", "LongMethod")
     private fun initDecryptedData(inputData: Data) {
     private fun initDecryptedData(inputData: Data) {
         val subject = inputData.getString(BundleKeys.KEY_NOTIFICATION_SUBJECT)
         val subject = inputData.getString(BundleKeys.KEY_NOTIFICATION_SUBJECT)
         val signature = inputData.getString(BundleKeys.KEY_NOTIFICATION_SIGNATURE)
         val signature = inputData.getString(BundleKeys.KEY_NOTIFICATION_SIGNATURE)
@@ -389,6 +390,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
             })
             })
     }
     }
 
 
+    @Suppress("MagicNumber")
     private fun showNotification(intent: Intent) {
     private fun showNotification(intent: Intent) {
         val largeIcon: Bitmap
         val largeIcon: Bitmap
         val priority = NotificationCompat.PRIORITY_HIGH
         val priority = NotificationCompat.PRIORITY_HIGH

+ 1 - 0
app/src/main/java/com/nextcloud/talk/models/json/push/DecryptedPushMessage.kt

@@ -70,6 +70,7 @@ data class DecryptedPushMessage(
     // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
     // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
     constructor() : this(null, null, "", null, 0, null, false, false, false, null, null, 0, null)
     constructor() : this(null, null, "", null, 0, null, false, false, false, null, null, 0, null)
 
 
+    @Suppress("Detekt.ComplexMethod")
     override fun equals(other: Any?): Boolean {
     override fun equals(other: Any?): Boolean {
         if (this === other) return true
         if (this === other) return true
         if (javaClass != other?.javaClass) return false
         if (javaClass != other?.javaClass) return false

+ 1 - 0
app/src/main/java/com/nextcloud/talk/utils/NotificationUtils.kt

@@ -47,6 +47,7 @@ import com.nextcloud.talk.utils.bundle.BundleKeys
 import com.nextcloud.talk.utils.preferences.AppPreferences
 import com.nextcloud.talk.utils.preferences.AppPreferences
 import java.io.IOException
 import java.io.IOException
 
 
+@Suppress("TooManyFunctions")
 object NotificationUtils {
 object NotificationUtils {
 
 
     enum class NotificationChannels {
     enum class NotificationChannels {