2015-07-31 22:05:24 +00:00
|
|
|
package org.thoughtcrime.securesms.notifications;
|
|
|
|
|
|
|
|
import android.app.PendingIntent;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.graphics.BitmapFactory;
|
|
|
|
|
2019-07-24 02:30:23 +00:00
|
|
|
import network.loki.messenger.R;
|
2017-08-22 01:37:39 +00:00
|
|
|
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
2017-09-21 17:03:05 +00:00
|
|
|
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
2015-07-31 22:05:24 +00:00
|
|
|
|
|
|
|
public class FailedNotificationBuilder extends AbstractNotificationBuilder {
|
|
|
|
|
|
|
|
public FailedNotificationBuilder(Context context, NotificationPrivacyPreference privacy, Intent intent) {
|
|
|
|
super(context, privacy);
|
|
|
|
|
2019-07-23 23:51:09 +00:00
|
|
|
setSmallIcon(R.drawable.ic_notification);
|
2015-07-31 22:05:24 +00:00
|
|
|
setLargeIcon(BitmapFactory.decodeResource(context.getResources(),
|
|
|
|
R.drawable.ic_action_warning_red));
|
|
|
|
setContentTitle(context.getString(R.string.MessageNotifier_message_delivery_failed));
|
|
|
|
setContentText(context.getString(R.string.MessageNotifier_failed_to_deliver_message));
|
|
|
|
setTicker(context.getString(R.string.MessageNotifier_error_delivering_message));
|
|
|
|
setContentIntent(PendingIntent.getActivity(context, 0, intent, 0));
|
|
|
|
setAutoCancel(true);
|
2017-08-22 01:37:39 +00:00
|
|
|
setAlarms(null, RecipientDatabase.VibrateState.DEFAULT);
|
2018-08-06 16:20:24 +00:00
|
|
|
setChannelId(NotificationChannels.FAILURES);
|
2015-07-31 22:05:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|