|
@@ -16,6 +16,7 @@
|
16
|
16
|
|
17
|
17
|
package org.jitsi.meet.sdk;
|
18
|
18
|
|
|
19
|
+import android.app.Activity;
|
19
|
20
|
import android.app.Notification;
|
20
|
21
|
import android.app.NotificationChannel;
|
21
|
22
|
import android.app.NotificationManager;
|
|
@@ -41,19 +42,19 @@ class RNOngoingNotification {
|
41
|
42
|
|
42
|
43
|
static final int NOTIFICATION_ID = new Random().nextInt(99999) + 10000;
|
43
|
44
|
|
44
|
|
- static void createOngoingConferenceNotificationChannel(Context activityContext) {
|
|
45
|
+ static void createOngoingConferenceNotificationChannel(Activity currentActivity) {
|
45
|
46
|
|
46
|
47
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
47
|
48
|
return;
|
48
|
49
|
}
|
49
|
50
|
|
50
|
|
- if (activityContext == null) {
|
|
51
|
+ if (currentActivity == null) {
|
51
|
52
|
JitsiMeetLogger.w(TAG + " Cannot create notification channel: no current context");
|
52
|
53
|
return;
|
53
|
54
|
}
|
54
|
55
|
|
55
|
56
|
NotificationManager notificationManager
|
56
|
|
- = (NotificationManager) activityContext.getSystemService(Context.NOTIFICATION_SERVICE);
|
|
57
|
+ = (NotificationManager) currentActivity.getSystemService(Context.NOTIFICATION_SERVICE);
|
57
|
58
|
|
58
|
59
|
NotificationChannel channel
|
59
|
60
|
= notificationManager.getNotificationChannel("JitsiOngoingConferenceChannel");
|
|
@@ -62,7 +63,7 @@ class RNOngoingNotification {
|
62
|
63
|
return;
|
63
|
64
|
}
|
64
|
65
|
|
65
|
|
- channel = new NotificationChannel("JitsiOngoingConferenceChannel", activityContext.getString(R.string.ongoing_notification_channel_name), NotificationManager.IMPORTANCE_DEFAULT);
|
|
66
|
+ channel = new NotificationChannel("JitsiOngoingConferenceChannel", currentActivity.getString(R.string.ongoing_notification_channel_name), NotificationManager.IMPORTANCE_DEFAULT);
|
66
|
67
|
channel.enableLights(false);
|
67
|
68
|
channel.enableVibration(false);
|
68
|
69
|
channel.setShowBadge(false);
|