Skip to content

Commit

Permalink
[TF][Fix] crash on Android S+
Browse files Browse the repository at this point in the history
  • Loading branch information
tehcneko authored and thermatk committed Dec 4, 2022
1 parent d6f0c81 commit 854ba8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public static void startPushService() {
// Telegram-FOSS: unconditionally enable push service
AlarmManager am = (AlarmManager) applicationContext.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(applicationContext, NotificationsService.class);
pendingIntent = PendingIntent.getBroadcast(applicationContext, 0, i, 0);
pendingIntent = PendingIntent.getBroadcast(applicationContext, 0, i, PendingIntent.FLAG_MUTABLE);

am.cancel(pendingIntent);
am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 60000, pendingIntent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void onCreate() {
notificationManager.createNotificationChannel(channel);
Intent explainIntent = new Intent("android.intent.action.VIEW");
explainIntent.setData(Uri.parse("https://github.com/Telegram-FOSS-Team/Telegram-FOSS/blob/master/Notifications.md"));
PendingIntent explainPendingIntent = PendingIntent.getActivity(this, 0, explainIntent, 0);
PendingIntent explainPendingIntent = PendingIntent.getActivity(this, 0, explainIntent, PendingIntent.FLAG_MUTABLE);
Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentIntent(explainPendingIntent)
.setShowWhen(false)
Expand Down

0 comments on commit 854ba8c

Please sign in to comment.