Skip to content

Commit 128fcb8

Browse files
committed
Suppress lint warnings for app distro
1 parent 1621eaf commit 128fcb8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/FirebaseAppDistributionNotificationsManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static com.google.firebase.appdistribution.impl.FirebaseAppDistributionNotificationsManager.NotificationType.FEEDBACK;
1919
import static java.util.concurrent.TimeUnit.SECONDS;
2020

21+
import android.annotation.SuppressLint;
2122
import android.app.Activity;
2223
import android.app.Notification;
2324
import android.app.NotificationChannel;
@@ -97,6 +98,9 @@ enum NotificationType {
9798
this.uiThreadExecutor = uiThreadExecutor;
9899
}
99100

101+
// Suppress lint as `areNotificationsEnabled()` verifies whether the notification can be send,
102+
// including API 33+. Developers are expected to ask for notification permissions themselves.
103+
@SuppressLint("MissingPermission")
100104
void showAppUpdateNotification(long totalBytes, long downloadedBytes, int stringResourceId) {
101105
// Create the NotificationChannel, but only on API 26+ because
102106
// the NotificationChannel class is new and not in the support library
@@ -179,7 +183,8 @@ public void showFeedbackNotification(
179183
});
180184
}
181185

182-
// this must be run on the main (UI) thread
186+
// This must be run on the main (UI) thread.
187+
@SuppressLint("MissingPermission")
183188
private void doShowFeedbackNotification() {
184189
LogWrapper.i(TAG, "Showing feedback notification");
185190
notificationManager.notify(FEEDBACK.tag, FEEDBACK.id, feedbackNotificationToBeShown);

0 commit comments

Comments
 (0)