forked from mirror/monocles_chat_clean
add local only flag to foreground service (Daniel Gultsch)
This commit is contained in:
parent
5f6583b703
commit
46382a73aa
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