From 9e5f07a855df480d39a20c68f0903f5e80198aee Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 12 Sep 2022 16:15:11 +0100 Subject: [PATCH] suppressing lint warning for constant that delegates to the correct value --- .../vector/app/fdroid/receiver/AlarmSyncBroadcastReceiver.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector-app/src/fdroid/java/im/vector/app/fdroid/receiver/AlarmSyncBroadcastReceiver.kt b/vector-app/src/fdroid/java/im/vector/app/fdroid/receiver/AlarmSyncBroadcastReceiver.kt index bd1e0eb0ee..bccbf42e92 100644 --- a/vector-app/src/fdroid/java/im/vector/app/fdroid/receiver/AlarmSyncBroadcastReceiver.kt +++ b/vector-app/src/fdroid/java/im/vector/app/fdroid/receiver/AlarmSyncBroadcastReceiver.kt @@ -16,6 +16,7 @@ package im.vector.app.fdroid.receiver +import android.annotation.SuppressLint import android.app.AlarmManager import android.app.PendingIntent import android.content.BroadcastReceiver @@ -65,6 +66,7 @@ class AlarmSyncBroadcastReceiver : BroadcastReceiver() { companion object { private const val REQUEST_CODE = 0 + @SuppressLint("WrongConstant") // PendingIntentCompat.FLAG_IMMUTABLE is a false positive fun scheduleAlarm(context: Context, sessionId: String, delayInSeconds: Int, clock: Clock) { // Reschedule Timber.v("## Sync: Scheduling alarm for background sync in $delayInSeconds seconds") @@ -87,6 +89,7 @@ class AlarmSyncBroadcastReceiver : BroadcastReceiver() { } } + @SuppressLint("WrongConstant") // PendingIntentCompat.FLAG_IMMUTABLE is a false positive fun cancelAlarm(context: Context) { Timber.v("## Sync: Cancel alarm for background sync") val intent = Intent(context, AlarmSyncBroadcastReceiver::class.java)