mark error notifications as sensitve and local only

This commit is contained in:
Christian Schneppe 2018-02-22 21:08:29 +01:00
parent bda381d3bb
commit 56864ad75b

View file

@ -815,8 +815,10 @@ public class NotificationService {
mXmppConnectionService.getString(R.string.try_again),
createTryAgainIntent());
mBuilder.setDeleteIntent(createDismissErrorIntent());
mBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
mBuilder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE);
mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp);
mBuilder.setLocalOnly(true);
mBuilder.setPriority(NotificationCompat.PRIORITY_LOW);
if (errors.size() == 1) {
Intent intent = new Intent(mXmppConnectionService, EditAccountActivity.class);
Account mAccount = mXmppConnectionService.getAccounts().get(0);
@ -832,7 +834,6 @@ public class NotificationService {
new Intent(mXmppConnectionService, ManageAccountActivity.class),
PendingIntent.FLAG_UPDATE_CURRENT));
}
notificationManager.notify(ERROR_NOTIFICATION_ID, mBuilder.build());
}