diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index ed3abe6b7b..79521673d0 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -82,4 +82,7 @@ add_definitions(-DHAVE_MEMRCHR -DHAVE_PTHREAD) target_compile_options(fairemail PRIVATE -Wno-c++11-narrowing -Wno-undefined-var-template) +#https://developer.android.com/guide/practices/page-sizes#cmake +target_link_options(fairemail PRIVATE "-Wl,-z,max-page-size=16384") + target_link_libraries(fairemail ${log-lib}) diff --git a/app/build.gradle b/app/build.gradle index d04998b0e0..2fc60f8aab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -207,7 +207,7 @@ android { manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes(("github" + getVersionCode() + getRevision()).getBytes()).toString(); externalNativeBuild { cmake { - arguments "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" // -z,max-page-size=16384 + arguments "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" } } buildConfigField "boolean", "TEST_RELEASE", "false" @@ -264,7 +264,7 @@ android { manifestPlaceholders.build_uuid = UUID.nameUUIDFromBytes(("fdroid" + getVersionCode() + getRevision()).getBytes()).toString(); externalNativeBuild { cmake { - arguments "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" // -z,max-page-size=16384 + arguments "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--build-id=none" // https://f-droid.org/docs/Reproducible_Builds/ // The build ID is a 160-bit SHA1 string computed over the elf header bits and section contents in the file. // It is bundled in the elf file as an entry in the notes section. @@ -783,7 +783,7 @@ dependencies { // https://github.com/bugsnag/bugsnag-android // https://mvnrepository.com/artifact/com.bugsnag/bugsnag-android implementation("com.bugsnag:bugsnag-android:$bugsnag_version") { - //exclude group: "com.bugsnag", module: "bugsnag-plugin-android-anr" + exclude group: "com.bugsnag", module: "bugsnag-plugin-android-anr" exclude group: "com.bugsnag", module: "bugsnag-plugin-android-ndk" exclude group: "com.bugsnag", module: "bugsnag-android-core" } diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 1e51f77e84..8d56cd207b 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -419,7 +419,7 @@ public class Log { ErrorTypes etypes = new ErrorTypes(); etypes.setUnhandledExceptions(true); - etypes.setAnrs(!BuildConfig.PLAY_STORE_RELEASE); + etypes.setAnrs(false); etypes.setNdkCrashes(false); config.setEnabledErrorTypes(etypes); config.setMaxBreadcrumbs(BuildConfig.PLAY_STORE_RELEASE ? 250 : 500);