From 8fb870c51c685645dc05415fd1775068d461c0a1 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 16 Oct 2025 19:35:14 +0200 Subject: [PATCH 01/26] don't show badge-counter in app icon for permanent notification --- .../org/thoughtcrime/securesms/connect/KeepAliveService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java b/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java index 4cae5cef9..c6929ce95 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java @@ -121,6 +121,7 @@ public class KeepAliveService extends Service { NotificationChannel channel = new NotificationChannel(NotificationCenter.CH_PERMANENT, "Receive messages in background.", NotificationManager.IMPORTANCE_MIN); // IMPORTANCE_DEFAULT will play a sound channel.setDescription("Ensure reliable message receiving."); + channel.setShowBadge(false); NotificationManager notificationManager = context.getSystemService(NotificationManager.class); notificationManager.createNotificationChannel(channel); } From 7cba6edca9e3443b2ddde658d7464379b9eb002e Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 16 Oct 2025 19:46:19 +0200 Subject: [PATCH 02/26] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3e743ab..bcd20e880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Delta Chat Android Changelog -## v2.20.0 +## Unreleased * target Android 15 * improve readability of info messages in dark mode @@ -16,6 +16,7 @@ * show dialog if user has permanently denied camera permission and tries to take picture for group avatar * several small fixes and improvements * add experimental built-in calls +* don't show badge counter in app icon for the permanent background notification * update to core 2.20.0 ## v2.11.0 From 8a57954eb37a43eb0e2b3e918df6e62729cf6576 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 28 Oct 2025 23:16:35 +0100 Subject: [PATCH 03/26] rename permanent channel id, delete old/deprecated one --- .../org/thoughtcrime/securesms/ApplicationContext.java | 7 +++++++ .../securesms/notifications/NotificationCenter.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index dbe09ab9a..5a0bafd8f 100644 --- a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -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); diff --git a/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java index 4c96c1c2b..11ef6a130 100644 --- a/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -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"; From 4f4e2bb29123fd1c39f316327fb8d4d740773b7f Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 28 Oct 2025 23:17:03 +0100 Subject: [PATCH 04/26] update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 445e35c17..be3083bf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Delta Chat Android Changelog +## Unreleased + +* don't show badge counter in app icon for the permanent background notification + ## v2.22.0 2025-10 @@ -17,7 +21,6 @@ * show dialog if user has permanently denied camera permission and tries to take picture for group avatar * several small fixes and improvements * add experimental built-in calls -* don't show badge counter in app icon for the permanent background notification * update to core 2.22.0 ## v2.11.0 From 3ffc71bc0f03dfda34cb40843568d27ef3e5951a Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 28 Oct 2025 23:24:11 +0100 Subject: [PATCH 05/26] remove deprecated stock string 72 --- src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java index 159ee327a..ec4d600ea 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java @@ -160,7 +160,6 @@ public class DcHelper { dcContext.setStockTranslation(69, context.getString(R.string.saved_messages)); dcContext.setStockTranslation(70, context.getString(R.string.device_talk_explain)); dcContext.setStockTranslation(71, context.getString(R.string.device_talk_welcome_message2)); - dcContext.setStockTranslation(72, context.getString(R.string.systemmsg_unknown_sender_for_chat)); dcContext.setStockTranslation(73, context.getString(R.string.systemmsg_subject_for_new_contact)); dcContext.setStockTranslation(74, context.getString(R.string.systemmsg_failed_sending_to)); dcContext.setStockTranslation(84, context.getString(R.string.configuration_failed_with_error)); From 2b798e812603f727c64049d87883ac68e3454d73 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Tue, 28 Oct 2025 23:46:22 +0100 Subject: [PATCH 06/26] don't force circle shape for shared shortcuts --- .../org/thoughtcrime/securesms/connect/DirectShareUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/connect/DirectShareUtil.java b/src/main/java/org/thoughtcrime/securesms/connect/DirectShareUtil.java index a9343226b..08238abfd 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/DirectShareUtil.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/DirectShareUtil.java @@ -151,11 +151,11 @@ public class DirectShareUtil { } private static @NonNull Bitmap getShortcutInfoBitmap(@NonNull Context context, @NonNull Recipient recipient) throws ExecutionException, InterruptedException { - return DrawableUtil.wrapBitmapForShortcutInfo(request(GlideApp.with(context).asBitmap(), context, recipient).circleCrop().submit().get()); + return DrawableUtil.wrapBitmapForShortcutInfo(request(GlideApp.with(context).asBitmap(), context, recipient).submit().get()); } private static Bitmap getFallbackDrawable(Context context, @NonNull Recipient recipient) { - return BitmapUtil.createFromDrawable(recipient.getFallbackAvatarDrawable(context), + return BitmapUtil.createFromDrawable(recipient.getFallbackAvatarDrawable(context, false), context.getResources().getDimensionPixelSize(android.R.dimen.notification_large_icon_width), context.getResources().getDimensionPixelSize(android.R.dimen.notification_large_icon_height)); } From 4f70cd12290cedbc2d5546b8843b808545b235ea Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 29 Oct 2025 12:24:24 +0100 Subject: [PATCH 07/26] mark systemmsg_unknown_sender_for_chat as deprecated --- src/main/res/values/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 289bf4933..3c5a67b7c 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -882,6 +882,7 @@ Prefer End-To-End Encryption + Unknown sender for this chat. See \'info\' for more details. Message from %1$s Failed to send message to %1$s. From 4387585ddcf124d7f2dd8fb56b36a751215567f3 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 18:08:10 +0100 Subject: [PATCH 08/26] remove deprecated amazon instructions --- RELEASE.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 474300f47..439aee16f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -109,17 +109,6 @@ This may take some days. c) tap "Publish release" -## Release on Amazon Appstore - -on : - -12. a) click "App List", for "Delta Chat", select "Add upcoming version" on the left - b) at "Step 1 / Existing file(s)" hit "Replace", upload the APK from above - c) on the "Step 1" page, add "Release notes" from CHANGELOG.md, hit "Next" - d) on "Step 2" and "Step 3" pages, hit "Next" - e) on "Step 4" page: "Submit app" - - ## Release on Huawei AppGallery on : From 46816b2c0ca532f395b0764a4b8f413f035b00e4 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 18:41:14 +0100 Subject: [PATCH 09/26] update chatmail relays URL --- .../org/thoughtcrime/securesms/InstantOnboardingActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java index ee0d02478..b6c187dfb 100644 --- a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java @@ -68,7 +68,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements private static final String TAG = InstantOnboardingActivity.class.getSimpleName(); private static final String DCACCOUNT = "dcaccount"; private static final String DCLOGIN = "dclogin"; - private static final String INSTANCES_URL = "https://delta.chat/chatmail"; + private static final String INSTANCES_URL = "https://chatmail.at/relays"; private static final String DEFAULT_CHATMAIL_HOST = "nine.testrun.org"; public static final String QR_ACCOUNT_EXTRA = "qr_account_extra"; From 54c3b6bc4c1d1787076841622eb00416d405a4ad Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 19:08:41 +0100 Subject: [PATCH 10/26] don't show email address in export button --- .../securesms/preferences/ChatsPreferenceFragment.java | 2 +- src/main/res/values/strings.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java b/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java index ef05483e3..f8ee836f6 100644 --- a/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java @@ -277,7 +277,7 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment { .setTitle(R.string.pref_backup) .setMessage(R.string.pref_backup_export_explain) .setNeutralButton(android.R.string.cancel, null) - .setPositiveButton(requireActivity().getString(R.string.pref_backup_export_x, addr), (dialogInterface, i) -> startImexOne(DcContext.DC_IMEX_EXPORT_BACKUP)); + .setPositiveButton(requireActivity().getString(R.string.pref_backup_export_this, addr), (dialogInterface, i) -> startImexOne(DcContext.DC_IMEX_EXPORT_BACKUP)); int[] allAccounts = DcHelper.getAccounts(requireActivity()).getAll(); if (allAccounts.length > 1) { String exportAllString = requireActivity().getString(R.string.pref_backup_export_all, allAccounts.length); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 3c5a67b7c..9ab1b0489 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -775,7 +775,8 @@ Backup Back Up Chats to External Storage A backup helps you to set up a new installation on this or on another device.\n\nThe backup will contain all messages, contacts and chats and your end-to-end Autocrypt setup. Keep the backup file in a safe place or delete it as soon as possible. - + Export this profile + Export %1$s Export all %1$d profiles From c2ac3dea15040a03f6b2709be2c3b29dc450b76a Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 22:06:11 +0100 Subject: [PATCH 11/26] improve all media screen --- .../java/org/thoughtcrime/securesms/AllMediaActivity.java | 2 +- .../database/loaders/BucketedThreadMediaLoader.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/AllMediaActivity.java b/src/main/java/org/thoughtcrime/securesms/AllMediaActivity.java index 4fdd996e6..7ab97e7b4 100644 --- a/src/main/java/org/thoughtcrime/securesms/AllMediaActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/AllMediaActivity.java @@ -68,8 +68,8 @@ public class AllMediaActivity extends PassphraseRequiredActionBarActivity protected void onCreate(Bundle bundle, boolean ready) { tabs.add(new TabData(R.string.webxdc_apps, DcMsg.DC_MSG_WEBXDC, 0, 0)); tabs.add(new TabData(R.string.tab_gallery, DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO)); - tabs.add(new TabData(R.string.files, DcMsg.DC_MSG_FILE, 0, 0)); tabs.add(new TabData(R.string.audio, DcMsg.DC_MSG_AUDIO, DcMsg.DC_MSG_VOICE, 0)); + tabs.add(new TabData(R.string.files, DcMsg.DC_MSG_FILE, 0, 0)); setContentView(R.layout.all_media_activity); diff --git a/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java b/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java index b2c6d4f82..ee60b0d79 100644 --- a/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java +++ b/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java @@ -238,7 +238,7 @@ public class BucketedThreadMediaLoader extends AsyncTaskLoader> months = new HashMap<>(); + private final Map> months = new HashMap<>(); void add(DcMsg record) { Calendar calendar = Calendar.getInstance(); @@ -249,9 +249,9 @@ public class BucketedThreadMediaLoader extends AsyncTaskLoader list = new LinkedList<>(); + LinkedList list = new LinkedList<>(); list.add(record); months.put(date, list); } From a0ffd8b34ec67973882b5cab8a48f72509506aa3 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 22:10:04 +0100 Subject: [PATCH 12/26] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be3083bf6..e99cc9a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * don't show badge counter in app icon for the permanent background notification +* fix sorting of old media in gallery ## v2.22.0 2025-10 From 91cc79d395463fa170eaae5b7bad99f235fd217b Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 23:35:10 +0100 Subject: [PATCH 13/26] remove deprecated oauth code --- .../securesms/RegistrationActivity.java | 160 +----------------- src/main/res/layout/registration_activity.xml | 24 +-- 2 files changed, 5 insertions(+), 179 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java index 7d1012408..cc81b9298 100644 --- a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java @@ -94,7 +94,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve Spinner imapSecurity; Spinner smtpSecurity; - Spinner authMethod; Spinner certCheck; private SwitchCompat proxySwitch; @@ -125,7 +124,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve imapSecurity = findViewById(R.id.imap_security); smtpSecurity = findViewById(R.id.smtp_security); - authMethod = findViewById(R.id.auth_method); certCheck = findViewById(R.id.cert_check); proxySwitch = findViewById(R.id.proxy_settings); @@ -216,21 +214,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve smtpSecurity.setSelection(ViewUtil.checkBounds(intVal, smtpSecurity)); expandAdvanced = expandAdvanced || intVal != 0; - int serverFlags = DcHelper.getInt(this, CONFIG_SERVER_FLAGS); - int sel = 0; - if((serverFlags&DcContext.DC_LP_AUTH_OAUTH2)!=0) { - sel = 1; - - // remove gmail oauth2 - if (DcHelper.getContext(this).isGmailOauth2Addr(email)) { // this is a blocking call, not perfect, but as rarely used and temporary, good enough - sel = 0; - updateProviderInfo(); // we refer to the hints in the device message, show them immediately - } - // /remove gmail oauth2 - } - authMethod.setSelection(ViewUtil.checkBounds(sel, authMethod)); - expandAdvanced = expandAdvanced || sel != 0; - int imapCertificateChecks = DcHelper.getInt(this, "imap_certificate_checks"); if (imapCertificateChecks == 3) { imapCertificateChecks = 2; // 3 is a deprecated alias for 2 @@ -287,7 +270,8 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve int id = item.getItemId(); if (id == R.id.do_register) { - do_register(); + updateProviderInfo(); + onLogin(); return true; } else if (id == android.R.id.home) { // handle close button click here @@ -297,26 +281,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve return super.onOptionsItemSelected(item); } - private void do_register() { - // "log in" button clicked - even if oauth2DeclinedByUser is true, - // we will ask for oauth2 to allow reverting the decision. - checkOauth2start().addListener(new ListenableFuture.Listener() { - @Override - public void onSuccess(Boolean oauth2started) { - if(!oauth2started) { - updateProviderInfo(); - onLogin(); - } - } - - @Override - public void onFailure(ExecutionException e) { - updateProviderInfo(); - onLogin(); - } - }); - } - @Override public void onDestroy() { super.onDestroy(); @@ -335,23 +299,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve switch (type) { case EMAIL: verifyEmail(inputEditText); - if (!oauth2DeclinedByUser) { - checkOauth2start().addListener(new ListenableFuture.Listener() { - @Override - public void onSuccess(Boolean oauth2started) { - if (!oauth2started) { - updateProviderInfo(); - } - } - - @Override - public void onFailure(ExecutionException e) { - updateProviderInfo(); - } - }); - } else { - updateProviderInfo(); - } + updateProviderInfo(); break; case SERVER: verifyServer(inputEditText); @@ -363,86 +311,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve } } - private long oauth2Requested = 0; - - // this flag is set, if the user has declined oauth2 at some point; - // if so, we won't bother em on focus changes again, - // however, to allow reverting the decision, we will always ask on clicking the login button. - private boolean oauth2DeclinedByUser = false; - - // this function checks if oauth2 is available for a given email address - // and and asks the user if one wants to start oauth2. - // the function returns the future "true" if oauth2 was started and "false" otherwise. - private ListenableFuture checkOauth2start() { - SettableFuture oauth2started = new SettableFuture<>(); - - String email = emailInput.getText().toString(); - if (!TextUtils.isEmpty(email) ) { - new PrecheckOauth2AsyncTask(this, email, oauth2started).execute(); - } - else { - oauth2started.set(false); - } - - return oauth2started; - } - - private static class PrecheckOauth2AsyncTask extends AsyncTask { - private final WeakReference activityWeakReference; - private final String email; - private final SettableFuture oauth2started; - private final DcContext dcContext; - private @NonNull String oauth2url = ""; - - public PrecheckOauth2AsyncTask(RegistrationActivity activity, String email, SettableFuture oauth2started) { - super(); - this.activityWeakReference = new WeakReference<>(activity); - this.email = email; - this.oauth2started = oauth2started; - this.dcContext = DcHelper.getContext(activity); - } - @Override - protected Void doInBackground(Void... voids) { - // the redirect-uri is also used as intent-filter in the manifest - // and should be whitelisted by the supported oauth2 services - String redirectUrl = "chat.delta:/"+BuildConfig.APPLICATION_ID+"/auth"; - oauth2url = dcContext.getOauth2Url(email, redirectUrl); - - // remove gmail oauth2 - if (dcContext.isGmailOauth2Url(oauth2url)) { - oauth2url = null; - } - // /remove gmail oauth2 - - return null; - } - - @Override - protected void onPostExecute(Void result) { - super.onPostExecute(result); - RegistrationActivity activity = activityWeakReference.get(); - if (activity!=null && !TextUtils.isEmpty(oauth2url)) { - new AlertDialog.Builder(activity) - .setTitle(R.string.login_info_oauth2_title) - .setMessage(R.string.login_info_oauth2_text) - .setNegativeButton(R.string.cancel, (dialog, which)->{ - activity.oauth2DeclinedByUser = true; - oauth2started.set(false); - }) - .setPositiveButton(R.string.perm_continue, (dialog, which)-> { - // pass control to browser, we'll be back in business at (**) - activity.oauth2Requested = System.currentTimeMillis(); - IntentUtils.showInBrowser(activity, oauth2url); - oauth2started.set(true); - }) - .setCancelable(false) - .show(); - } else { - oauth2started.set(false); - } - } - } - private void updateProviderInfo() { Util.runOnBackground(() -> { provider = getContext(this).getProviderFromEmailWithDns(emailInput.getText().toString()); @@ -495,27 +363,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve } } - @Override - protected void onNewIntent(Intent intent) { - super.onNewIntent(intent); - if(Intent.ACTION_VIEW.equals(intent.getAction())) { - Uri uri = intent.getData(); - String path = uri.getPath(); - if(!(path.startsWith("/"+BuildConfig.APPLICATION_ID)||path.startsWith("/auth")) - || System.currentTimeMillis()-oauth2Requested > 3*60*60*1000) { - return; // timeout after some hours or a request belonging to a bad path. - } - - // back in business after we passed control to the browser in (**) - String code = uri.getQueryParameter("code"); - if(!TextUtils.isEmpty(code)) { - passwordInput.setText(code); - authMethod.setSelection(1/*OAuth2*/); - onLogin(); - } - } - } - private void verifyEmail(TextInputEditText view) { String error = getString(R.string.login_error_mail); String email = view.getText().toString(); @@ -634,7 +481,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve param.smtpUser = getParam(R.id.smtp_login_text, false); param.smtpPassword = getParam(R.id.smtp_password_text, false); param.certificateChecks = certificateChecksFromInt(certCheck.getSelectedItemPosition()); - param.oauth2 = authMethod.getSelectedItemPosition() == 1; new Thread(() -> { Rpc rpc = DcHelper.getRpc(this); diff --git a/src/main/res/layout/registration_activity.xml b/src/main/res/layout/registration_activity.xml index 500387aae..e254e6d07 100644 --- a/src/main/res/layout/registration_activity.xml +++ b/src/main/res/layout/registration_activity.xml @@ -131,7 +131,7 @@ android:visibility="gone" tools:visibility="visible" app:constraint_referenced_ids="inbox, imap_login, imap_server, imap_port, imap_security_label, imap_security, outbox_view_spacer_top, - outbox, smtp_login, smtp_password, smtp_server, smtp_port, smtp_security_label, smtp_security, auth_method_label, auth_method, cert_check_label, cert_check, view_log_button, proxy_settings" /> + outbox, smtp_login, smtp_password, smtp_server, smtp_port, smtp_security_label, smtp_security, cert_check_label, cert_check, view_log_button, proxy_settings" /> - - - - + app:layout_constraintTop_toBottomOf="@id/smtp_security" /> Date: Thu, 30 Oct 2025 23:39:30 +0100 Subject: [PATCH 14/26] mark strings as deprecated --- src/main/res/values/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 9ab1b0489..c6f0c9c4a 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -654,6 +654,7 @@ SMTP Server SMTP Port SMTP Security + Authorization Method Proxy @@ -669,7 +670,9 @@ Your friends can add this proxy by scanning the QR code. Share Link + Continue with simplified setup? + The entered address supports a simplified setup (OAuth 2.0).\n\nIn the next step, please allow Delta Chat to send and receive messages.\n\nDelta Chat does not collect user data, everything stays on your device. Certificate Checks Please enter a valid e-mail address From 69b0e953affac3dc548b4519d7742aff4dd9f629 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 30 Oct 2025 23:39:50 +0100 Subject: [PATCH 15/26] remove oauth2 url redirection handling --- src/main/AndroidManifest.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 702cdadbd..241079c7e 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -239,18 +239,6 @@ android:windowSoftInputMode="stateUnchanged" android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:exported="true"> - - - - - - - - - - - Date: Thu, 30 Oct 2025 23:44:16 +0100 Subject: [PATCH 16/26] remove oauth code from DcContext --- src/main/java/com/b44t/messenger/DcContext.java | 13 ------------- .../securesms/ConversationListActivity.java | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/src/main/java/com/b44t/messenger/DcContext.java b/src/main/java/com/b44t/messenger/DcContext.java index df91fe82e..d358ff54d 100644 --- a/src/main/java/com/b44t/messenger/DcContext.java +++ b/src/main/java/com/b44t/messenger/DcContext.java @@ -71,9 +71,6 @@ public class DcContext { public final static int DC_QR_REVIVE_VERIFYGROUP = 512; public final static int DC_QR_LOGIN = 520; - public final static int DC_LP_AUTH_OAUTH2 = 0x2; - public final static int DC_LP_AUTH_NORMAL = 0x4; - public final static int DC_SOCKET_AUTO = 0; public final static int DC_SOCKET_SSL = 1; public final static int DC_SOCKET_STARTTLS = 2; @@ -145,7 +142,6 @@ public class DcContext { public native String getInfo (); public native int getConnectivity (); public native String getConnectivityHtml (); - public native String getOauth2Url (String addr, String redirectUrl); public native String initiateKeyTransfer (); public native void imex (int what, String dir); public native String imexHasBackup (String dir); @@ -246,15 +242,6 @@ public class DcContext { setConfigInt("is_muted", muted? 1 : 0); } - public boolean isGmailOauth2Addr(String addr) { - final String oauth2url = getOauth2Url(addr, "chat.delta:/foo"); - return isGmailOauth2Url(oauth2url); - } - - public boolean isGmailOauth2Url(String oauth2url) { - return oauth2url.startsWith("https://accounts.google.com/"); - } - public void restartIo() { stopIo(); startIo(); diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationListActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationListActivity.java index 5106f0f8d..3a0cca84e 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationListActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationListActivity.java @@ -133,19 +133,6 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit Prefs.setStringPreference(this, Prefs.LAST_DEVICE_MSG_LABEL, deviceMsgLabel); } - // remove gmail oauth2 - final int serverFlags = dcContext.getConfigInt(CONFIG_SERVER_FLAGS); - if ((serverFlags & DcContext.DC_LP_AUTH_OAUTH2)!=0) { - Util.runOnAnyBackgroundThread(() -> { - if (dcContext.isGmailOauth2Addr(dcContext.getConfig(CONFIG_ADDRESS))) { - final DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT); - msg.setText("⚠️ GMail Users: If you have problems using GMail, go to \"Settings / Advanced / Password and Account\".\n\nThere, login again using an \"App Password\"."); - dcContext.addDeviceMsg("info_about_gmail_oauth2_removal8", msg); - } - }); - } - // /remove gmail oauth2 - } catch(Exception e) { e.printStackTrace(); } From 394a749e7f351ec0224d26b4784cc2367ac815e5 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 31 Oct 2025 21:06:12 +0100 Subject: [PATCH 17/26] add 'proxy enabled' hints needed by https://github.com/chatmail/core/pull/7359 at some point --- src/main/res/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 9ab1b0489..1d1c2b817 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -668,6 +668,8 @@ Do you want to use proxy \"%1$s\"? Your friends can add this proxy by scanning the QR code. Share Link + Proxy Enabled + You are using a proxy. If you\'re having trouble connecting, try a different proxy. Continue with simplified setup? The entered address supports a simplified setup (OAuth 2.0).\n\nIn the next step, please allow Delta Chat to send and receive messages.\n\nDelta Chat does not collect user data, everything stays on your device. From d54ae28a73c38e4b2c23901e81f5113c58705928 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Fri, 31 Oct 2025 23:16:10 +0100 Subject: [PATCH 18/26] remove deprecated companion app --- src/main/AndroidManifest.xml | 11 --- .../securesms/RegistrationActivity.java | 25 ----- .../securesms/WelcomeActivity.java | 11 --- .../securesms/connect/DcHelper.java | 16 ---- .../service/IPCAddAccountsService.java | 93 ------------------- 5 files changed, 156 deletions(-) delete mode 100644 src/main/java/org/thoughtcrime/securesms/service/IPCAddAccountsService.java diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 241079c7e..660325bc1 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -405,17 +405,6 @@ android:name=".service.FetchForegroundService" android:foregroundServiceType="dataSync" /> - - - - - - diff --git a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java index cc81b9298..ab7f5e6cb 100644 --- a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java @@ -12,15 +12,11 @@ import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SEND_PORT; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SEND_SECURITY; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SEND_SERVER; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SEND_USER; -import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SERVER_FLAGS; import static org.thoughtcrime.securesms.connect.DcHelper.getContext; -import static org.thoughtcrime.securesms.service.IPCAddAccountsService.ACCOUNT_DATA; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Resources; -import android.net.Uri; -import android.os.AsyncTask; import android.os.Bundle; import android.text.Editable; import android.text.TextUtils; @@ -39,7 +35,6 @@ import androidx.annotation.IdRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; -import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.SwitchCompat; import androidx.constraintlayout.widget.Group; @@ -58,16 +53,11 @@ import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.ViewUtil; import org.thoughtcrime.securesms.util.views.ProgressDialog; -import java.lang.ref.WeakReference; -import java.util.concurrent.ExecutionException; - import chat.delta.rpc.Rpc; import chat.delta.rpc.RpcException; import chat.delta.rpc.types.EnteredCertificateChecks; import chat.delta.rpc.types.EnteredLoginParam; import chat.delta.rpc.types.Socket; -import chat.delta.util.ListenableFuture; -import chat.delta.util.SettableFuture; public class RegistrationActivity extends BaseActionBarActivity implements DcEventCenter.DcEventDelegate { @@ -220,21 +210,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve } certCheck.setSelection(ViewUtil.checkBounds(imapCertificateChecks, certCheck)); expandAdvanced = expandAdvanced || imapCertificateChecks != 0; - } else if (getIntent() != null && getIntent().getBundleExtra(ACCOUNT_DATA) != null) { - // Companion app might have sent account data - Bundle b = getIntent().getBundleExtra(ACCOUNT_DATA); - String emailAddress = b.getString(CONFIG_ADDRESS); - String password = b.getString(CONFIG_MAIL_PASSWORD); - if (!TextUtils.isEmpty(emailAddress) && !TextUtils.isEmpty(password)) { - emailInput.setText(emailAddress); - passwordInput.setText(password); - onLogin(); - } else { - String errorText = "Companion app auto-configuration failed."; - errorText += TextUtils.isEmpty(emailAddress) ? " Missing emailAddress." : ""; - errorText += TextUtils.isEmpty(password) ? " Missing password." : ""; - Toast.makeText(this, errorText, Toast.LENGTH_LONG).show(); - } } if (expandAdvanced) { onAdvancedSettings(); } diff --git a/src/main/java/org/thoughtcrime/securesms/WelcomeActivity.java b/src/main/java/org/thoughtcrime/securesms/WelcomeActivity.java index 8f0231a01..cbd808421 100644 --- a/src/main/java/org/thoughtcrime/securesms/WelcomeActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WelcomeActivity.java @@ -51,7 +51,6 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen public static final int PICK_BACKUP = 20574; private final static String TAG = WelcomeActivity.class.getSimpleName(); public static final String TMP_BACKUP_FILE = "tmp-backup-file"; - public static final String DC_REQUEST_ACCOUNT_DATA = "chat.delta.DC_REQUEST_ACCOUNT_DATA"; private ProgressDialog progressDialog = null; private boolean imexUserAborted; @@ -87,16 +86,6 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen registerForEvents(); initializeActionBar(); - if (!DcHelper.hasAnyConfiguredContext(this)) { - Intent intent = new Intent(); - // Since android API 26 only explicit broadcasts are allowed for IPC with a few exceptions. - // As a result we have to send for each companion app we want to support an intent with a - // specified package - intent.setPackage("chat.delta.androidyggmail"); - intent.setAction(DC_REQUEST_ACCOUNT_DATA); - sendBroadcast(intent); - } - DcHelper.maybeShowMigrationError(this); } diff --git a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java index ec4d600ea..7355c0d6a 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java @@ -95,27 +95,11 @@ public class DcHelper { return ApplicationContext.getInstance(context).notificationCenter; } - public static boolean hasAnyConfiguredContext(Context context) { - DcAccounts accounts = getAccounts(context); - int[] accountIds = accounts.getAll(); - for (int accountId : accountIds) { - if (accounts.getAccount(accountId).isConfigured() == 1) { - return true; - } - } - return false; - } - public static boolean isConfigured(Context context) { DcContext dcContext = getContext(context); return dcContext.isConfigured() == 1; } - public static String getSelfAddr(Context context) { - DcContext dcContext = getContext(context); - return dcContext.getConfig(CONFIG_CONFIGURED_ADDRESS); - } - public static int getInt(Context context, String key) { DcContext dcContext = getContext(context); return dcContext.getConfigInt(key); diff --git a/src/main/java/org/thoughtcrime/securesms/service/IPCAddAccountsService.java b/src/main/java/org/thoughtcrime/securesms/service/IPCAddAccountsService.java deleted file mode 100644 index 96d341e92..000000000 --- a/src/main/java/org/thoughtcrime/securesms/service/IPCAddAccountsService.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.thoughtcrime.securesms.service; - -import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK; -import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; -import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_ADDRESS; -import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_CONFIGURED_ADDRESS; - -import android.app.Service; -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import android.os.Handler; -import android.os.IBinder; -import android.os.Message; -import android.os.Messenger; -import android.util.Log; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.b44t.messenger.DcAccounts; -import com.b44t.messenger.DcContext; - -import org.thoughtcrime.securesms.ConversationListActivity; -import org.thoughtcrime.securesms.RegistrationActivity; -import org.thoughtcrime.securesms.connect.AccountManager; -import org.thoughtcrime.securesms.connect.DcHelper; - -import java.lang.ref.WeakReference; - -/** - * This (interprocess communication) service is invoked by companion apps aiming to add a new account to Delta Chat - */ - -public class IPCAddAccountsService extends Service { - public final static int ADD_ACCOUNT = 1; - public final static String ACCOUNT_DATA = "ACCOUNT_DATA"; - - private static final String TAG = IPCAddAccountsService.class.getSimpleName(); - - private static class IncomingHandler extends Handler { - final WeakReference contextRef; - - public IncomingHandler(Context context) { - contextRef = new WeakReference<>(context); - } - - @Override - public void handleMessage(@NonNull Message msg) { - Bundle data = msg.getData(); - Context context = contextRef.get(); - if (data != null && context != null && msg.what == ADD_ACCOUNT) { - String newAddress = data.getString(CONFIG_ADDRESS); - Log.d(TAG, "ADD ACCOUNT called for account: " + newAddress); - - // check if account already exists, if so, switch to that account - DcAccounts accounts = DcHelper.getAccounts(context); - int[] accountIds = accounts.getAll(); - for (int accountId : accountIds) { - DcContext dcContext = accounts.getAccount(accountId); - String accountAddress = dcContext.getConfig(CONFIG_CONFIGURED_ADDRESS); - if (accountAddress.equals(newAddress)) { - Log.d(TAG, newAddress + " already exists. Switching account."); - AccountManager.getInstance().switchAccount(context, accountId); - Intent switchAccountIntent = new Intent(context, ConversationListActivity.class); - switchAccountIntent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK); - context.startActivity(switchAccountIntent); - return; - } - } - - AccountManager.getInstance().beginAccountCreation(context); - Intent registrationIntent = new Intent(context, RegistrationActivity.class); - registrationIntent.putExtra(ACCOUNT_DATA, data); - registrationIntent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK); - context.startActivity(registrationIntent); - } - } - } - - private final Messenger messenger = new Messenger(new IncomingHandler(this)); - - @Nullable - @Override - public IBinder onBind(Intent intent) { - return messenger.getBinder(); - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - return START_NOT_STICKY; - } -} From 79ded65e479338b37865ea24a933c3ac919b2bec Mon Sep 17 00:00:00 2001 From: adbenitez Date: Fri, 31 Oct 2025 23:22:21 +0100 Subject: [PATCH 19/26] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e99cc9a2a..7f4c431ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * don't show badge counter in app icon for the permanent background notification +* remove deprecated "companion app" code * fix sorting of old media in gallery ## v2.22.0 From f1911d3910e243d34bda1761a6560b49cee405ef Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 31 Oct 2025 23:13:19 +0100 Subject: [PATCH 20/26] Remove "Watch Sent folder" preference It is going to be removed in the next core release: https://github.com/chatmail/core/pull/7189 counterpart of desktop PR at https://github.com/deltachat/deltachat-desktop/pull/5611 --- .../thoughtcrime/securesms/connect/DcHelper.java | 1 - .../preferences/AdvancedPreferenceFragment.java | 13 ------------- src/main/res/values/strings.xml | 1 + 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java index 7355c0d6a..5a851241e 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java @@ -64,7 +64,6 @@ public class DcHelper { public static final String CONFIG_DISPLAY_NAME = "displayname"; public static final String CONFIG_SELF_STATUS = "selfstatus"; public static final String CONFIG_SELF_AVATAR = "selfavatar"; - public static final String CONFIG_SENTBOX_WATCH = "sentbox_watch"; public static final String CONFIG_MVBOX_MOVE = "mvbox_move"; public static final String CONFIG_ONLY_FETCH_MVBOX = "only_fetch_mvbox"; public static final String CONFIG_BCC_SELF = "bcc_self"; diff --git a/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java b/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java index e4cebc9ba..d11795e29 100644 --- a/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java @@ -5,7 +5,6 @@ import static android.text.InputType.TYPE_TEXT_VARIATION_URI; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_BCC_SELF; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_MVBOX_MOVE; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_ONLY_FETCH_MVBOX; -import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SENTBOX_WATCH; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SHOW_EMAILS; import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_WEBXDC_REALTIME_ENABLED; import static org.thoughtcrime.securesms.connect.DcHelper.getRpc; @@ -58,7 +57,6 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment private static final String TAG = AdvancedPreferenceFragment.class.getSimpleName(); private ListPreference showEmails; - CheckBoxPreference sentboxWatchCheckbox; CheckBoxPreference bccSelfCheckbox; CheckBoxPreference mvboxMoveCheckbox; CheckBoxPreference onlyFetchMvboxCheckbox; @@ -83,15 +81,6 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment sendAsm.setOnPreferenceClickListener(new SendAsmListener()); } - sentboxWatchCheckbox = (CheckBoxPreference) this.findPreference("pref_sentbox_watch"); - if (sentboxWatchCheckbox != null) { - sentboxWatchCheckbox.setOnPreferenceChangeListener((preference, newValue) -> { - boolean enabled = (Boolean) newValue; - dcContext.setConfigInt(CONFIG_SENTBOX_WATCH, enabled? 1 : 0); - return true; - }); - } - bccSelfCheckbox = (CheckBoxPreference) this.findPreference("pref_bcc_self"); if (bccSelfCheckbox != null) { bccSelfCheckbox.setOnPreferenceChangeListener((preference, newValue) -> { @@ -261,7 +250,6 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment if (dcContext.isChatmail()) { showEmails.setVisible(false); showSystemContacts.setVisible(false); - sentboxWatchCheckbox.setVisible(false); bccSelfCheckbox.setVisible(false); mvboxMoveCheckbox.setVisible(false); onlyFetchMvboxCheckbox.setVisible(false); @@ -282,7 +270,6 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment showEmails.setValue(value); updateListSummary(showEmails, value); - sentboxWatchCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_SENTBOX_WATCH)); bccSelfCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_BCC_SELF)); mvboxMoveCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_MVBOX_MOVE)); onlyFetchMvboxCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_ONLY_FETCH_MVBOX)); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index ae0100068..ecd1ef88c 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -795,6 +795,7 @@ Use Default Image Select From Gallery If you change this option, make sure, your server and your other clients are configured accordingly.\n\nOtherwise things may not work at all. + Watch Sent Folder Send Copy to Self Required when using this account on multiple devices. From 7e0e6b6cabfe16ebc39fbbc33cb4bb0f1d3a7ca2 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 31 Oct 2025 23:21:28 +0100 Subject: [PATCH 21/26] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f4c431ec..0f6ccd3a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * don't show badge counter in app icon for the permanent background notification * remove deprecated "companion app" code +* remove "Watch Sent Folder" preference * fix sorting of old media in gallery ## v2.22.0 From b842392555c82e01cbba1a6dd8bbffb929af793b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 1 Nov 2025 18:36:59 +0100 Subject: [PATCH 22/26] this really removes the watch-sent option a kind of sticky option :) --- src/main/res/xml/preferences_advanced.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/res/xml/preferences_advanced.xml b/src/main/res/xml/preferences_advanced.xml index 6ec084ecd..3b54f5ecc 100644 --- a/src/main/res/xml/preferences_advanced.xml +++ b/src/main/res/xml/preferences_advanced.xml @@ -88,11 +88,6 @@ android:entries="@array/pref_show_emails_entries" android:entryValues="@array/pref_show_emails_values" /> - - Date: Sat, 1 Nov 2025 22:32:17 +0100 Subject: [PATCH 23/26] update deltachat-core-rust to 'chore(release): prepare for 2.23.0' of 'v2.23.0' --- jni/deltachat-core-rust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index 41c80cf3f..c9b3da4a1 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit 41c80cf3f2dfca71639771e73cf2fd361ec5881d +Subproject commit c9b3da4a1a5e3ee2f50c243c5e2a24d207234a49 From b4f026b04e85eab63c28cc729ed183fe5a84fd52 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sat, 1 Nov 2025 23:32:27 +0100 Subject: [PATCH 24/26] remove deprecated chat verification code --- jni/dc_wrapper.c | 9 ++------- src/main/java/com/b44t/messenger/DcChat.java | 1 - src/main/java/com/b44t/messenger/DcContext.java | 2 +- .../securesms/ContactSelectionListFragment.java | 16 ---------------- .../securesms/GroupCreateActivity.java | 17 +---------------- .../thoughtcrime/securesms/ProfileFragment.java | 1 - .../securesms/connect/DcHelper.java | 2 +- .../securesms/database/model/ThreadRecord.java | 7 ------- src/main/res/values/strings.xml | 1 + 9 files changed, 6 insertions(+), 50 deletions(-) diff --git a/jni/dc_wrapper.c b/jni/dc_wrapper.c index d9120bcb3..54ed7951c 100644 --- a/jni/dc_wrapper.c +++ b/jni/dc_wrapper.c @@ -536,10 +536,10 @@ JNIEXPORT jint Java_com_b44t_messenger_DcContext_createChatByContactId(JNIEnv *e } -JNIEXPORT jint Java_com_b44t_messenger_DcContext_createGroupChat(JNIEnv *env, jobject obj, jboolean verified, jstring name) +JNIEXPORT jint Java_com_b44t_messenger_DcContext_createGroupChat(JNIEnv *env, jobject obj, jstring name) { CHAR_REF(name); - jint ret = (jint)dc_create_group_chat(get_dc_context(env, obj), verified, namePtr); + jint ret = (jint)dc_create_group_chat(get_dc_context(env, obj), 0, namePtr); CHAR_UNREF(name); return ret; } @@ -1261,11 +1261,6 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcChat_canSend(JNIEnv *env, jobject o } -JNIEXPORT jboolean Java_com_b44t_messenger_DcChat_isProtected(JNIEnv *env, jobject obj) -{ - return dc_chat_is_protected(get_dc_chat(env, obj))!=0; -} - JNIEXPORT jboolean Java_com_b44t_messenger_DcChat_isSendingLocations(JNIEnv *env, jobject obj) { diff --git a/src/main/java/com/b44t/messenger/DcChat.java b/src/main/java/com/b44t/messenger/DcChat.java index 7d5e2597d..90497a797 100644 --- a/src/main/java/com/b44t/messenger/DcChat.java +++ b/src/main/java/com/b44t/messenger/DcChat.java @@ -44,7 +44,6 @@ public class DcChat { public native boolean isSelfTalk (); public native boolean isDeviceTalk (); public native boolean canSend (); - public native boolean isProtected (); public native boolean isSendingLocations(); public native boolean isMuted (); public native boolean isContactRequest (); diff --git a/src/main/java/com/b44t/messenger/DcContext.java b/src/main/java/com/b44t/messenger/DcContext.java index d358ff54d..11611665a 100644 --- a/src/main/java/com/b44t/messenger/DcContext.java +++ b/src/main/java/com/b44t/messenger/DcContext.java @@ -165,7 +165,7 @@ public class DcContext { public native void setChatVisibility (int chat_id, int visibility); public native int getChatIdByContactId (int contact_id); public native int createChatByContactId(int contact_id); - public native int createGroupChat (boolean verified, String name); + public native int createGroupChat (String name); public native int createBroadcastList (); public native boolean isContactInChat (int chat_id, int contact_id); public native int addContactToChat (int chat_id, int contact_id); diff --git a/src/main/java/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/main/java/org/thoughtcrime/securesms/ContactSelectionListFragment.java index 24d1adaf5..da0478fa9 100644 --- a/src/main/java/org/thoughtcrime/securesms/ContactSelectionListFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ContactSelectionListFragment.java @@ -79,7 +79,6 @@ public class ContactSelectionListFragment extends Fragment private static final String TAG = ContactSelectionListFragment.class.getSimpleName(); public static final String MULTI_SELECT = "multi_select"; - public static final String SELECT_VERIFIED_EXTRA = "select_verified"; public static final String SELECT_UNENCRYPTED_EXTRA = "select_unencrypted_extra"; public static final String ALLOW_CREATION = "allow_creation"; public static final String PRESELECTED_CONTACTS = "preselected_contacts"; @@ -240,10 +239,6 @@ public class ContactSelectionListFragment extends Fragment return getActivity().getIntent().getBooleanExtra(MULTI_SELECT, false); } - private boolean isSelectVerfied() { - return getActivity().getIntent().getBooleanExtra(SELECT_VERIFIED_EXTRA, false); - } - private boolean isUnencrypted() { return getActivity().getIntent().getBooleanExtra(SELECT_UNENCRYPTED_EXTRA, false); } @@ -348,17 +343,6 @@ public class ContactSelectionListFragment extends Fragment return; } - if (isSelectVerfied() && !contact.getDcContact().isVerified()) { - new AlertDialog.Builder(getActivity()) - .setMessage(R.string.verified_contact_required_explain) - .setNeutralButton(R.string.learn_more, (d, w) -> DcHelper.openHelp(getActivity(), "#howtoe2ee")) - .setNegativeButton(R.string.qrscan_title, (d, w) -> getActivity().startActivity(new Intent(getActivity(), QrActivity.class))) - .setPositiveButton(R.string.ok, null) - .setCancelable(true) - .show(); - return; - } - selectedContacts.add(contactId); contact.setChecked(true); if (onContactSelectedListener != null) { diff --git a/src/main/java/org/thoughtcrime/securesms/GroupCreateActivity.java b/src/main/java/org/thoughtcrime/securesms/GroupCreateActivity.java index 0ae42148b..da5b79fa4 100644 --- a/src/main/java/org/thoughtcrime/securesms/GroupCreateActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/GroupCreateActivity.java @@ -60,7 +60,6 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity private DcContext dcContext; - private boolean verified; private boolean unencrypted; private boolean broadcast; private EditText groupName; @@ -77,7 +76,6 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity protected void onCreate(Bundle state, boolean ready) { dcContext = DcHelper.getContext(this); setContentView(R.layout.group_create_activity); - verified = false; broadcast = getIntent().getBooleanExtra(CREATE_BROADCAST, false); unencrypted = getIntent().getBooleanExtra(UNENCRYPTED, false); Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true); @@ -93,7 +91,6 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity if(groupChatId !=0) { isEdit = true; DcChat dcChat = dcContext.getChat(groupChatId); - verified = dcChat.isProtected(); broadcast = dcChat.isOutBroadcast(); unencrypted = !dcChat.isEncrypted(); } @@ -234,7 +231,6 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity if (groupChatId != 0) { updateGroup(groupName); } else { - verified = !unencrypted && !broadcast && allMembersVerified(); createGroup(groupName); } @@ -244,21 +240,10 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity return false; } - private boolean allMembersVerified() { - for (int id : getAdapter().getContacts()) { - DcContact contact = dcContext.getContact(id); - if (contact != null && !contact.isVerified()) { - return false; - } - } - return true; - } - @Override public void onItemClick(int contactId) { if (contactId == DcContact.DC_CONTACT_ID_ADD_MEMBER) { Intent intent = new Intent(this, ContactMultiSelectionActivity.class); - intent.putExtra(ContactSelectionListFragment.SELECT_VERIFIED_EXTRA, verified); intent.putExtra(ContactSelectionListFragment.SELECT_UNENCRYPTED_EXTRA, unencrypted); ArrayList preselectedContacts = new ArrayList<>(getAdapter().getContacts()); intent.putExtra(ContactSelectionListFragment.PRESELECTED_CONTACTS, preselectedContacts); @@ -287,7 +272,7 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity return; } } else { - groupChatId = dcContext.createGroupChat(verified, groupName); + groupChatId = dcContext.createGroupChat(groupName); } for (int contactId : getAdapter().getContacts()) { diff --git a/src/main/java/org/thoughtcrime/securesms/ProfileFragment.java b/src/main/java/org/thoughtcrime/securesms/ProfileFragment.java index 8f072a3cb..80e754555 100644 --- a/src/main/java/org/thoughtcrime/securesms/ProfileFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ProfileFragment.java @@ -201,7 +201,6 @@ public class ProfileFragment extends Fragment public void onAddMember() { DcChat dcChat = dcContext.getChat(chatId); Intent intent = new Intent(getContext(), ContactMultiSelectionActivity.class); - intent.putExtra(ContactSelectionListFragment.SELECT_VERIFIED_EXTRA, dcChat.isProtected()); ArrayList preselectedContacts = new ArrayList<>(); for (int memberId : dcContext.getChatContacts(chatId)) { preselectedContacts.add(memberId); diff --git a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java index 5a851241e..dd31937a4 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java @@ -396,7 +396,7 @@ public class DcHelper { return new ThreadRecord(body, recipient, date, unreadCount, chatId, - chat.getVisibility(), chat.isProtected(), chat.isSendingLocations(), chat.isMuted(), chat.isContactRequest(), summary); + chat.getVisibility(), chat.isSendingLocations(), chat.isMuted(), chat.isContactRequest(), summary); } public static boolean isNetworkConnected(Context context) { diff --git a/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java b/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java index 7bd2a7842..c41e31d76 100644 --- a/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java +++ b/src/main/java/org/thoughtcrime/securesms/database/model/ThreadRecord.java @@ -43,7 +43,6 @@ public class ThreadRecord { private final int unreadCount; private final int visibility; - private final boolean isProtected; private final boolean isSendingLocations; private final boolean isMuted; private final boolean isContactRequest; @@ -53,7 +52,6 @@ public class ThreadRecord { @NonNull Recipient recipient, long dateReceived, int unreadCount, long threadId, int visibility, - boolean isProtected, boolean isSendingLocations, boolean isMuted, boolean isContactRequest, @@ -65,7 +63,6 @@ public class ThreadRecord { this.body = body; this.unreadCount = unreadCount; this.visibility = visibility; - this.isProtected = isProtected; this.isSendingLocations = isSendingLocations; this.isMuted = isMuted; this.isContactRequest = isContactRequest; @@ -116,10 +113,6 @@ public class ThreadRecord { return visibility; } - public boolean isProtected() { - return isProtected; - } - public boolean isSendingLocations() { return isSendingLocations; } diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index ecd1ef88c..a14f95777 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -1028,6 +1028,7 @@ Introduced by %1$s Introduced by me Introduced + To guarantee end-to-end-encryption, you can only add contacts with a green checkmark to this group.\n\nYou may meet contacts in person and scan their QR Code to introduce them. Select chat to send the message to From c59a6828378d59dc63d9ac24dc57361aabe96cd5 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sat, 1 Nov 2025 23:32:42 +0100 Subject: [PATCH 25/26] update changelog --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6ccd3a4..7c3f79487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,16 @@ ## Unreleased +* metadata protection: protect Date header +* metadata protection: protect Autocrypt header +* better multi-device: synchronize group creation across devices +* data saving: do not send Autocrypt header in read receipts +* improve onboarding speed * don't show badge counter in app icon for the permanent background notification * remove deprecated "companion app" code -* remove "Watch Sent Folder" preference +* remove deprecated "Watch Sent Folder" preference * fix sorting of old media in gallery +* update to core 2.23.0 ## v2.22.0 2025-10 From 96068be20bd8d98103b1b183d48243663d0f5210 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Sat, 1 Nov 2025 23:50:37 +0100 Subject: [PATCH 26/26] update code at src/androidTest --- .../java/com/b44t/messenger/uitests/offline/ForwardingTest.java | 2 +- .../java/com/b44t/messenger/uitests/offline/SharingTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/androidTest/java/com/b44t/messenger/uitests/offline/ForwardingTest.java b/src/androidTest/java/com/b44t/messenger/uitests/offline/ForwardingTest.java index c8c7f6483..5c6acacb1 100644 --- a/src/androidTest/java/com/b44t/messenger/uitests/offline/ForwardingTest.java +++ b/src/androidTest/java/com/b44t/messenger/uitests/offline/ForwardingTest.java @@ -54,7 +54,7 @@ public class ForwardingTest { // The thing is, DC_STATE_OUT_PENDING show a rotating circle animation, and Espresso doesn't work // with animations, and the tests would hang and never finish. dcContext.setConfig("bcc_self", "0"); - activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat(false, "group")); + activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat( "group")); } @After diff --git a/src/androidTest/java/com/b44t/messenger/uitests/offline/SharingTest.java b/src/androidTest/java/com/b44t/messenger/uitests/offline/SharingTest.java index 5f55323cd..023940335 100644 --- a/src/androidTest/java/com/b44t/messenger/uitests/offline/SharingTest.java +++ b/src/androidTest/java/com/b44t/messenger/uitests/offline/SharingTest.java @@ -52,7 +52,7 @@ public class SharingTest { @Before public void createGroup() { - activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat(false, "group")); + activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat( "group")); } @Before