Repository navigation
Fix Android HTTP JNI leaks and honor SQLite storage selection - #1555
Merged
Merged
Conversation
Keep local JNI references scoped to every send, including failures, and release task globals before terminal callbacks so retained native requests do not keep completed futures alive. Honor explicit AAR storage options and translate the legacy USE_ROOM flag. Add ART/CheckJNI GC regressions and AAR storage configuration checks to prevent recurrence. Files changed: .github/workflows/build-android.yml cmake/MatsdkOptions.cmake lib/android_build/maesdk/src/main/cpp/CMakeLists.txt lib/http/HttpClient_Android.cpp lib/http/HttpClient_Android.hpp tests/android-http-client/CMakeLists.txt tests/android-http-client/HttpClient.java tests/android-http-client/android-http-client-tests.cpp tests/android-http-client/run-tests.py tests/android-storage/CMakeLists.txt tests/android-storage/options-tests.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 01fc96f0-9072-4225-903a-5402ae46b7ae
Baiju Meswani (baijumeswani)
approved these changes
Nov 5, 2026
bmehta001
enabled auto-merge (squash)
November 5, 2026 07:07
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1551.
Fixes #1550.
FutureShiminto a caller frame on a persistently attached thread.MATSDK_ANDROID_USE_ROOM=OFF. Restore the deprecatedUSE_ROOMalias; an explicit canonical option takes precedence.Validation
-Xcheck:jni-Xlint:all -Werror, Ruff, andgit diff --checkpassed.The ART tests link the production C++ HTTP client to a deterministic Java FutureTask peer, without network or AndroidX dependencies. They verify reference lifetime and callback behavior, not a Teams end-to-end session or physical-device reproduction. No cases are skipped or excluded.