rename permanent channel id, delete old/deprecated one

This commit is contained in:
adbenitez
2025-10-28 23:16:35 +01:00
parent 00ec33b1e8
commit 8a57954eb3
2 changed files with 8 additions and 1 deletions
@@ -12,6 +12,7 @@ import android.util.Log;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.NotificationManagerCompat;
import androidx.multidex.MultiDexApplication;
import androidx.work.Constraints;
import androidx.work.ExistingPeriodicWorkPolicy;
@@ -89,6 +90,12 @@ public class ApplicationContext extends MultiDexApplication {
dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath());
rpc = new Rpc(new FFITransport(dcAccounts.getJsonrpcInstance()));
AccountManager.getInstance().migrateToDcAccounts(this);
// October-2025 migration: delete deprecated "permanent channel" id
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.deleteNotificationChannel("dc_foreground_notification_ch");
// end October-2025 migration
int[] allAccounts = dcAccounts.getAll();
for (int accountId : allAccounts) {
DcContext ac = dcAccounts.getAccount(accountId);
@@ -241,7 +241,7 @@ public class NotificationCenter {
// channelIds: CH_MSG_* are used here, the other ones from outside (defined here to have some overview)
public static final String CH_MSG_PREFIX = "ch_msg";
public static final String CH_MSG_VERSION = "5";
public static final String CH_PERMANENT = "dc_foreground_notification_ch";
public static final String CH_PERMANENT = "dc_fg_notification_ch";
public static final String CH_GENERIC = "ch_generic";
public static final String CH_CALLS_PREFIX = "call_chan";