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 MESSAGES_IMPORTANCE_MIN = "gotify_messages_min_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";
|
||||
}
|
||||
|
||||
@@ -75,8 +76,8 @@ public class NotificationSupport {
|
||||
}
|
||||
|
||||
/**
|
||||
* Map {@link com.github.gotify.client.model.Message#getPriority() Gotify message priorities}
|
||||
* to Android channels.
|
||||
* Map {@link com.github.gotify.client.model.Message#getPriority() Gotify message priorities to
|
||||
* Android channels.
|
||||
*
|
||||
* <pre>
|
||||
* Gotify Priority | Android Importance
|
||||
|
||||
@@ -138,7 +138,8 @@ public class WebSocketService extends Service {
|
||||
lastReceivedMessage.set(message.getId());
|
||||
}
|
||||
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) {
|
||||
@@ -181,7 +182,8 @@ public class WebSocketService extends Service {
|
||||
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
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) {
|
||||
showNotificationGroup(priority);
|
||||
@@ -213,7 +215,8 @@ public class WebSocketService extends Service {
|
||||
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
NotificationCompat.Builder b =
|
||||
new NotificationCompat.Builder(this, NotificationSupport.convertPriorityToChannel(priority));
|
||||
new NotificationCompat.Builder(
|
||||
this, NotificationSupport.convertPriorityToChannel(priority));
|
||||
|
||||
b.setAutoCancel(true)
|
||||
.setDefaults(Notification.DEFAULT_ALL)
|
||||
|
||||
Reference in New Issue
Block a user