mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-28 16:04:10 +01:00
add local only flag to foreground service (Daniel Gultsch)
This commit is contained in:
parent
c204ca68f2
commit
0b94d5f0dd
1 changed files with 2 additions and 1 deletions
|
@ -1458,7 +1458,7 @@ public class NotificationService {
|
|||
|
||||
private PendingIntent createShowLocationIntent(final Message message) {
|
||||
Iterable<Intent> intents = GeoHelper.createGeoIntentsFromMessage(mXmppConnectionService, message);
|
||||
for (Intent intent : intents) {
|
||||
for (final Intent intent : intents) {
|
||||
if (intent.resolveActivity(mXmppConnectionService.getPackageManager()) != null) {
|
||||
return PendingIntent.getActivity(mXmppConnectionService, generateRequestCode(message.getConversation(), 18), intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
@ -1657,6 +1657,7 @@ public class NotificationService {
|
|||
mBuilder.setWhen(0);
|
||||
mBuilder.setPriority(Notification.PRIORITY_MIN);
|
||||
mBuilder.setSmallIcon(connected > 0 ? R.drawable.ic_link_white_24dp : R.drawable.ic_link_off_white_24dp);
|
||||
mBuilder.setLocalOnly(true);
|
||||
if (Compatibility.runsTwentySix()) {
|
||||
mBuilder.setChannelId(FOREGROUND_CHANNEL_ID);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue