Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Nov 13, 2024
2 parents 0974655 + 1355303 commit ccdad04
Show file tree
Hide file tree
Showing 118 changed files with 521 additions and 3,425 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r23c
ndk-version: r27

- name: Compile core
env:
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ArcaneChat Android Changelog

## v1.48.1
## v1.48.3
2024-10

* new Proxy settings screen available at "Advanced / Proxy"
Expand All @@ -10,6 +10,8 @@
* scan Proxies' QR code and use them
* make Proxy URLs inside Delta Chat tappable
* open Delta Chat when tapping Proxy URLs in other apps
* support for realtime webxdc apps moved out of experimental and enabled by default
* realtime webxdc apps can be disabled at "Settings / Advanced"
* "New Contact / Link" button to view, share or copy the invite line
* "New Contact / Scan" button to easier access the scanner functionality
* open "New Contact" scan/show activities directly, do not try to be too smart and open the last active tab
Expand Down Expand Up @@ -44,8 +46,10 @@
* assign messages to ad-hoc group with matching name and members
* use stricter TLS checks for HTTPS downloads (images in HTML mails, Autoconfig)
* improve logging for failed QR code scans, AEAP, Autocrypt, notification permissions and sending errors
* improve logging of multi account setup (log account ID)
* show more context for the "Cannot establish guaranteed..." info message
* show original file name in "Message Info"
* show file name in "Message Info"
* show root SMTP connection failure in connectivity view
* fix: Sort received outgoing message down if it's fresher than all non fresh messages
* fix: avoid app being killed when processing a PUSH notification
* fix crash when refreshing avatar
Expand All @@ -65,8 +69,12 @@
* fix: normalize proxy URLs
* fix connections getting stuck in "Updating..." sometimes
* fix scanning "add second device" QR code from scanner above chatlist
* fix warning about wrong password
* fix app getting stale when receiving a PUSH notifications takes longer
* fix app getting stale on network changes
* fix: skip IDLE if we got unsolicited FETCH
* update translations and local help
* update to core 1.148.4
* update to core 1.148.6


## v1.46.14
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/cmdline-tools/bin
# Install NDK manually. Other SDK parts are installed automatically by gradle.
#
# If you change the NDK version here, also change it in `flake.nix`.
# NDK version r23c LTS aka 23.2.8568313
RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} 'ndk;23.2.8568313'
# NDK version r27 LTS aka 27.0.11902837
RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} 'ndk;27.0.11902837'

ENV ANDROID_NDK_ROOT ${ANDROID_SDK_ROOT}/ndk/23.2.8568313
ENV ANDROID_NDK_ROOT ${ANDROID_SDK_ROOT}/ndk/27.0.11902837
ENV PATH ${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
Expand Down
21 changes: 13 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ the following steps are done in a PR called `prep-VERSION` (no leading "v"):
6. build APKs:
a) generate debug APK at "Build / Build Bundle(s)/APK / Build APK(s)"
b) generate release APK at "Build / Generate Signed Bundle or APK",
select "APK", add keys, flavor `gplayRelease`
select "APK", add keys, flavor `gplayRelease`.
this APK will go to the stores and is located at `gplay/release`


## Push Test Releases
Expand Down Expand Up @@ -79,16 +80,21 @@ only afterwards, push the APK to stores. **consider a blog post.**

on <https://play.google.com/apps/publish/>:

9. a) open "Delta Chat/Release/Production"
then "Create new release" and upload APK from above
9. a) open "Delta Chat / Test and release / Production"
then "Create new release" and upload APK from above
b) fill out "Release details/Release notes" (500 chars), add the line
"These features will roll out over the coming days. Thanks for using Delta Chat!";
release name should be default ("123 (1.2.3)")
c) click "Next", set "Rollout Percentage" to 1% (later 2%, 5%, 10%, 20%, 50%, 100%),
click "Save"
c) click "Next", set "Rollout Percentage" to 50%, click "Save"
d) Go to "Publishing Overview", "Managed publishing" is usually off;
click "Send change for review", confirm

2 days later, change "Rollout Percentage" to 99%. Two more days later to 100%.
Rollout is anyways slower in practise, however,
only as long as we do not enter 100%, we can retract the version
(Once we reach 100%, we have to submit a new version for approval.
During these up to 4 days, sometimes longer, we cannot do anything on existing rollout)


## Tag for F-Droid and create Github release

Expand All @@ -111,9 +117,8 @@ on <https://developer.amazon.com/dashboard>:
12. a) 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" page: "Does your app collect or transfer user data to third parties?" -> No, then "Next"
e) on "Step 3" page: "Next"
f) on "Step 4" page: "Submit app"
d) on "Step 2" and "Step 3" pages, hit "Next"
e) on "Step 4" page: "Submit app"


## Release on Huawei AppGallery
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ android {
// > Task :stripFatDebugDebugSymbols
// Unable to strip the following libraries, packaging them as they are: libanimation-decoder-gif.so, libnative-utils.so.
// See <https://issuetracker.google.com/issues/237187538> for details.
ndkVersion "23.2.8568313"
ndkVersion "27.0.12077973"
useLibrary 'org.apache.http.legacy'

defaultConfig {
versionCode 30000694
versionName "1.48.2"
versionCode 30000695
versionName "1.48.4"

applicationId "chat.delta.lite"
multiDexEnabled true
Expand Down Expand Up @@ -206,7 +206,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
implementation 'androidx.work:work-runtime:2.9.1'
implementation 'androidx.emoji2:emoji2-emojipicker:1.4.0'
implementation 'androidx.emoji2:emoji2-emojipicker:1.5.0'
implementation 'com.google.guava:guava:31.1-android'
implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' // plays video and audio
implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
Expand Down
76 changes: 21 additions & 55 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
ndk-bundle
platform-tools
platforms-android-34
ndk-23-2-8568313
ndk-27-0-11902837
]);
rust-version = pkgs.lib.removeSuffix "\n"
(builtins.readFile ./scripts/rust-toolchain);
in {
devShells.default = pkgs.mkShell {
ANDROID_SDK_ROOT = "${android-sdk}/share/android-sdk";
ANDROID_NDK_ROOT =
"${android-sdk}/share/android-sdk/ndk/23.2.8568313";
"${android-sdk}/share/android-sdk/ndk/27.0.11902837";
buildInputs = [
android-sdk
pkgs.openjdk17
Expand Down
51 changes: 0 additions & 51 deletions jni/dc_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,6 @@
#include "deltachat-core-rust/deltachat-ffi/deltachat.h"


#if __ANDROID_API__ == 16
unsigned long getauxval(unsigned long type) {
return 0;
}

#include <sys/socket.h>
#include <unistd.h>

int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen,
int flags)
{
if (flags != 0) {
// Not supported by the fallback.
return -1;
}

if (vlen == 0) {
return 0;
}

ssize_t n = sendmsg(sockfd, &msgvec->msg_hdr, flags);
if (n == -1) {
return -1;
}

(*msgvec).msg_len = n;
return 1;
}

int recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen,
int flags, struct timespec *timeout)
{
if (flags != 0) {
// Not supported by the fallback.
return -1;
}

if (vlen == 0) {
return 0;
}

int n = recvmsg(sockfd, &msgvec->msg_hdr, flags);
if (n == -1) {
return -1;
}
(*msgvec).msg_len = n;
return 1;
}
#endif


static dc_msg_t* get_dc_msg(JNIEnv *env, jobject obj);


Expand Down
2 changes: 1 addition & 1 deletion jni/deltachat-core-rust
Submodule deltachat-core-rust updated 56 files
+94 −0 CHANGELOG.md
+436 −198 Cargo.lock
+14 −21 Cargo.toml
+1 −1 deltachat-ffi/Cargo.toml
+2 −2 deltachat-ffi/deltachat.h
+2 −2 deltachat-jsonrpc/Cargo.toml
+10 −2 deltachat-jsonrpc/src/api.rs
+3 −0 deltachat-jsonrpc/src/api/types/events.rs
+2 −0 deltachat-jsonrpc/src/api/types/message.rs
+1 −1 deltachat-jsonrpc/typescript/package.json
+1 −1 deltachat-repl/Cargo.toml
+2 −4 deltachat-repl/src/cmdline.rs
+1 −1 deltachat-rpc-client/pyproject.toml
+4 −0 deltachat-rpc-client/src/deltachat_rpc_client/contact.py
+1 −0 deltachat-rpc-client/tests/test_something.py
+1 −1 deltachat-rpc-server/Cargo.toml
+1 −1 deltachat-rpc-server/npm-package/package.json
+4 −3 deny.toml
+23 −57 flake.lock
+11 −3 flake.nix
+1 −1 package.json
+1 −1 python/pyproject.toml
+1 −1 release-date.in
+42 −70 src/chat.rs
+2 −5 src/chatlist.rs
+16 −8 src/configure.rs
+96 −1 src/contact.rs
+5 −9 src/context.rs
+5 −54 src/decrypt.rs
+1 −2 src/download.rs
+5 −6 src/ephemeral.rs
+1 −2 src/html.rs
+46 −21 src/imap.rs
+5 −27 src/imap/idle.rs
+5 −15 src/imap/scan_folders.rs
+4 −5 src/imex/transfer.rs
+1 −2 src/location.rs
+27 −22 src/message.rs
+6 −12 src/mimefactory.rs
+26 −4 src/mimeparser.rs
+5 −33 src/peer_channels.rs
+4 −2 src/qr.rs
+3 −3 src/quota.rs
+2 −3 src/reaction.rs
+2 −2 src/receive_imf.rs
+51 −6 src/receive_imf/tests.rs
+2 −6 src/scheduler.rs
+22 −6 src/securejoin.rs
+7 −3 src/smtp.rs
+13 −16 src/sql.rs
+1 −2 src/stock_str.rs
+2 −4 src/summary.rs
+1 −2 src/test_utils.rs
+2 −3 src/tests/verified_chats.rs
+1 −2 src/tools.rs
+2 −3 src/webxdc/maps_integration.rs
8 changes: 4 additions & 4 deletions scripts/ndk-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ if test -z "$NDK_HOST_TAG"; then
fi

TOOLCHAIN="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$NDK_HOST_TAG"
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="$TOOLCHAIN/bin/armv7a-linux-androideabi16-clang"
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="$TOOLCHAIN/bin/armv7a-linux-androideabi21-clang"
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$TOOLCHAIN/bin/aarch64-linux-android21-clang"
export CARGO_TARGET_I686_LINUX_ANDROID_LINKER="$TOOLCHAIN/bin/i686-linux-android16-clang"
export CARGO_TARGET_I686_LINUX_ANDROID_LINKER="$TOOLCHAIN/bin/i686-linux-android21-clang"
export CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER="$TOOLCHAIN/bin/x86_64-linux-android21-clang"

export RUSTUP_TOOLCHAIN=$(cat "$(dirname "$0")/rust-toolchain")
Expand Down Expand Up @@ -125,7 +125,7 @@ unset CPATH

if test -z $1 || test $1 = armeabi-v7a; then
echo "-- cross compiling to armv7-linux-androideabi (arm) --"
TARGET_CC="$TOOLCHAIN/bin/armv7a-linux-androideabi16-clang" \
TARGET_CC="$TOOLCHAIN/bin/armv7a-linux-androideabi21-clang" \
TARGET_AR="$TOOLCHAIN/bin/llvm-ar" \
TARGET_RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \
cargo build $RELEASEFLAG --target armv7-linux-androideabi -p deltachat_ffi --features jsonrpc
Expand All @@ -143,7 +143,7 @@ fi

if test -z $1 || test $1 = x86; then
echo "-- cross compiling to i686-linux-android (x86) --"
TARGET_CC="$TOOLCHAIN/bin/i686-linux-android16-clang" \
TARGET_CC="$TOOLCHAIN/bin/i686-linux-android21-clang" \
TARGET_AR="$TOOLCHAIN/bin/llvm-ar" \
TARGET_RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \
cargo build $RELEASEFLAG --target i686-linux-android -p deltachat_ffi --features jsonrpc
Expand Down
Loading

0 comments on commit ccdad04

Please sign in to comment.