Merge pull request #1843 from MilosKozak/foreground-service-fix

resolve dangling else and private constructor for singleton
This commit is contained in:
Tebbe Ubben 2019-06-21 14:32:08 +02:00 committed by GitHub
commit d014962fc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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