mark error notifications as sensitve and local only. fixes #2795
This commit is contained in:
parent
c35ac11a42
commit
72cf702e75
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue