Sfoglia il codice sorgente

Fix notification channel strings not being updated

NotificationManager#createNotificationChannel() is safe to run again
even if the notification channel has already been created - in this case
it simply updates the name and description, which is what we want.

Signed-off-by: AJ Jordan <alex@strugee.net>
AJ Jordan 3 anni fa
parent
commit
ebd5b6f1d6
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      src/main/java/com/owncloud/android/MainApp.java

+ 1 - 2
src/main/java/com/owncloud/android/MainApp.java

@@ -529,8 +529,7 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
                                       String channelId, int channelName,
                                       int channelDescription, Context context, int importance) {
         if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O
-            && getAppContext() != null
-            && notificationManager.getNotificationChannel(channelId) == null) {
+            && getAppContext() != null) {
             CharSequence name = context.getString(channelName);
             String description = context.getString(channelDescription);
             NotificationChannel channel = new NotificationChannel(channelId, name, importance);