Fix formatting as suggested by spotlessJava
This commit is contained in:
@@ -16,7 +16,8 @@ public class NotificationSupport {
|
|||||||
public static final String FOREGROUND = "gotify_foreground";
|
public static final String FOREGROUND = "gotify_foreground";
|
||||||
public static final String MESSAGES_IMPORTANCE_MIN = "gotify_messages_min_importance";
|
public static final String MESSAGES_IMPORTANCE_MIN = "gotify_messages_min_importance";
|
||||||
public static final String MESSAGES_IMPORTANCE_LOW = "gotify_messages_low_importance";
|
public static final String MESSAGES_IMPORTANCE_LOW = "gotify_messages_low_importance";
|
||||||
public static final String MESSAGES_IMPORTANCE_DEFAULT = "gotify_messages_default_importance";
|
public static final String MESSAGES_IMPORTANCE_DEFAULT =
|
||||||
|
"gotify_messages_default_importance";
|
||||||
public static final String MESSAGES_IMPORTANCE_HIGH = "gotify_messages_high_importance";
|
public static final String MESSAGES_IMPORTANCE_HIGH = "gotify_messages_high_importance";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,8 +76,8 @@ public class NotificationSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map {@link com.github.gotify.client.model.Message#getPriority() Gotify message priorities}
|
* Map {@link com.github.gotify.client.model.Message#getPriority() Gotify message priorities to
|
||||||
* to Android channels.
|
* Android channels.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* Gotify Priority | Android Importance
|
* Gotify Priority | Android Importance
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ public class WebSocketService extends Service {
|
|||||||
lastReceivedMessage.set(message.getId());
|
lastReceivedMessage.set(message.getId());
|
||||||
}
|
}
|
||||||
broadcast(message);
|
broadcast(message);
|
||||||
showNotification(message.getId(), message.getTitle(), message.getMessage(), message.getPriority());
|
showNotification(
|
||||||
|
message.getId(), message.getTitle(), message.getMessage(), message.getPriority());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void broadcast(Message message) {
|
private void broadcast(Message message) {
|
||||||
@@ -181,7 +182,8 @@ public class WebSocketService extends Service {
|
|||||||
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
NotificationCompat.Builder b =
|
NotificationCompat.Builder b =
|
||||||
new NotificationCompat.Builder(this, NotificationSupport.convertPriorityToChannel(priority));
|
new NotificationCompat.Builder(
|
||||||
|
this, NotificationSupport.convertPriorityToChannel(priority));
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
showNotificationGroup(priority);
|
showNotificationGroup(priority);
|
||||||
@@ -213,7 +215,8 @@ public class WebSocketService extends Service {
|
|||||||
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
NotificationCompat.Builder b =
|
NotificationCompat.Builder b =
|
||||||
new NotificationCompat.Builder(this, NotificationSupport.convertPriorityToChannel(priority));
|
new NotificationCompat.Builder(
|
||||||
|
this, NotificationSupport.convertPriorityToChannel(priority));
|
||||||
|
|
||||||
b.setAutoCancel(true)
|
b.setAutoCancel(true)
|
||||||
.setDefaults(Notification.DEFAULT_ALL)
|
.setDefaults(Notification.DEFAULT_ALL)
|
||||||
|
|||||||
Reference in New Issue
Block a user