Skip to content

Commit

Permalink
Fix non-fcm web socket monitor crash loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal committed Sep 28, 2022
1 parent 09b9349 commit 7dc149d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<issue id="VectorRaster" severity="error" />
<issue id="ButtonOrder" severity="error" />
<issue id="ExtraTranslation" severity="warning" />
<issue id="UnspecifiedImmutableFlag" severity="error" />

<!-- Custom lints -->
<issue id="LogNotSignal" severity="error" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import androidx.core.app.AlarmManagerCompat;
import androidx.core.content.ContextCompat;

import org.signal.core.util.PendingIntentFlags;
import org.signal.core.util.logging.Log;
import org.whispersystems.signalservice.api.util.SleepTimer;

Expand Down Expand Up @@ -67,7 +68,7 @@ private class AlarmReceiver extends BroadcastReceiver {

private void setAlarm(long millis, String action) {
final Intent intent = new Intent(action);
final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntentFlags.mutable());
final AlarmManager alarmManager = ContextCompat.getSystemService(context, AlarmManager.class);

Log.w(TAG, "Setting alarm to wake up in " + millis + "ms.");
Expand Down

0 comments on commit 7dc149d

Please sign in to comment.