mark error notifications as sensitve and local only. fixes #2795

This commit is contained in:
Daniel Gultsch 2018-02-20 08:22:08 +01:00
parent c35ac11a42
commit 72cf702e75
1 changed files with 2 additions and 1 deletions

View File

@ -797,12 +797,13 @@ public class NotificationService {
mXmppConnectionService.getString(R.string.try_again), mXmppConnectionService.getString(R.string.try_again),
createTryAgainIntent()); createTryAgainIntent());
mBuilder.setDeleteIntent(createDismissErrorIntent()); mBuilder.setDeleteIntent(createDismissErrorIntent());
mBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); mBuilder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp); mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp);
} else { } else {
mBuilder.setSmallIcon(R.drawable.ic_stat_alert_warning); mBuilder.setSmallIcon(R.drawable.ic_stat_alert_warning);
} }
mBuilder.setLocalOnly(true);
mBuilder.setPriority(NotificationCompat.PRIORITY_LOW); mBuilder.setPriority(NotificationCompat.PRIORITY_LOW);
mBuilder.setContentIntent(PendingIntent.getActivity(mXmppConnectionService, mBuilder.setContentIntent(PendingIntent.getActivity(mXmppConnectionService,
145, 145,