mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
31 lines
1.2 KiB
Java
31 lines
1.2 KiB
Java
|
package org.thoughtcrime.securesms.notifications;
|
||
|
|
||
|
import android.app.PendingIntent;
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.graphics.BitmapFactory;
|
||
|
|
||
|
import org.thoughtcrime.securesms.R;
|
||
|
import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase;
|
||
|
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||
|
|
||
|
public class FailedNotificationBuilder extends AbstractNotificationBuilder {
|
||
|
|
||
|
public FailedNotificationBuilder(Context context, NotificationPrivacyPreference privacy, Intent intent) {
|
||
|
super(context, privacy);
|
||
|
|
||
|
setSmallIcon(R.drawable.icon_notification);
|
||
|
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);
|
||
|
setAlarms(null, RecipientPreferenceDatabase.VibrateState.DEFAULT);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|