|
4 | 4 |
|
5 | 5 | package org.mozilla.reference.browser
|
6 | 6 |
|
| 7 | +import android.annotation.SuppressLint |
7 | 8 | import android.app.Notification
|
8 | 9 | import android.app.NotificationChannel
|
9 | 10 | import android.app.PendingIntent
|
@@ -48,6 +49,14 @@ object NotificationManager {
|
48 | 49 |
|
49 | 50 | private val logger = Logger("NotificationManager")
|
50 | 51 |
|
| 52 | + /** |
| 53 | + * Displays a notification for each valid tab received from a device. |
| 54 | + * |
| 55 | + * @param context The Android application context. |
| 56 | + * @param device The device from which the tabs were received, or `null` if unavailable. |
| 57 | + * @param tabs A list of tabs to be displayed. |
| 58 | + */ |
| 59 | + @SuppressLint("MissingPermission", "NotifyUsage") |
51 | 60 | fun showReceivedTabs(context: Context, device: Device?, tabs: List<TabData>) {
|
52 | 61 | // In the future, experiment with displaying multiple tabs from the same device as as Notification Groups.
|
53 | 62 | // For now, a single notification per tab received will suffice.
|
@@ -117,6 +126,7 @@ object NotificationManager {
|
117 | 126 | /**
|
118 | 127 | * Launch a notification of the data policy, and record notification time and version.
|
119 | 128 | */
|
| 129 | + @SuppressLint("MissingPermission", "NotifyUsage") |
120 | 130 | private fun notifyDataPolicy(context: Context, preferences: SharedPreferences) {
|
121 | 131 | val resources = context.resources
|
122 | 132 |
|
|
0 commit comments