浏览代码

fix compile error

AndyScherzinger 7 年之前
父节点
当前提交
84d40f0421
共有 1 个文件被更改,包括 9 次插入10 次删除
  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);
         }
     }