From f87b30771b415061065e6a66871822a1a60d9f63 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 21 Jun 2019 09:05:39 +0200 Subject: [PATCH] resolve dangling else and private constructor for singleton --- .../PersistentNotificationPlugin.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java index 8ce1ba7a1a..f68bc6e6a1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java @@ -73,7 +73,7 @@ public class PersistentNotificationPlugin extends PluginBase { /// End Android Auto - public PersistentNotificationPlugin(Context ctx) { + private PersistentNotificationPlugin(Context ctx) { super(new PluginDescription() .mainType(PluginType.GENERAL) .neverVisible(true) @@ -227,8 +227,10 @@ public class PersistentNotificationPlugin extends PluginBase { builder.setContentText(line2 != null ? line2 : MainApp.gs(R.string.noprofileset)); builder.setSubText(line3 != null ? line3 : MainApp.gs(R.string.noprofileset)); /// Android Auto - if (unreadConversationBuilder != null) builder.extend(new NotificationCompat.CarExtender() - .setUnreadConversation(unreadConversationBuilder.build())); + if (unreadConversationBuilder != null) { + builder.extend(new NotificationCompat.CarExtender() + .setUnreadConversation(unreadConversationBuilder.build())); + } /// End Android Auto