Browse Source

fix compile error

AndyScherzinger 7 years ago
parent
commit
84d40f0421
1 changed files with 9 additions and 10 deletions
  1. 9 10
      src/main/java/com/owncloud/android/MainApp.java

+ 9 - 10
src/main/java/com/owncloud/android/MainApp.java

@@ -270,16 +270,15 @@ public class MainApp extends MultiDexApplication {
         if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O
                 && getAppContext() != null
                 && notificationManager.getNotificationChannel(channelId) == null) {
-                CharSequence name = context.getString(channelName);
-                String description = context.getString(channelDescription);
-                NotificationChannel channel = new NotificationChannel(channelId, name,
-                        NotificationManager.IMPORTANCE_LOW);
-
-                channel.setDescription(description);
-                channel.enableLights(false);
-                channel.enableVibration(false);
-                notificationManager.createNotificationChannel(channel);
-            }
+            CharSequence name = context.getString(channelName);
+            String description = context.getString(channelDescription);
+            NotificationChannel channel = new NotificationChannel(channelId, name,
+                    NotificationManager.IMPORTANCE_LOW);
+
+            channel.setDescription(description);
+            channel.enableLights(false);
+            channel.enableVibration(false);
+            notificationManager.createNotificationChannel(channel);
         }
     }