Closed gnarea closed 12 months ago
I can only reproduce the ThreadPolicy issue with Typefaces on one of my phones, although the stacktrace is different.
Unfortunately, there aren't great solutions for this:
a) Disable those checks entirely, like we did before for other checks;
b) Use hacks with reflection to whitelist certain issues (https://medium.com/@tokudu/how-to-whitelist-strictmode-violations-on-android-based-on-stacktrace-eb0018e909aa);
c) Use a penaltyListener
instead of the penaltyDeath
+ penaltyLog
to be able to filter some issues out, but only on API 28+ (https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder#penaltyListener(java.util.concurrent.Executor,%20android.os.StrictMode.OnThreadViolationListener))
Option C seems like the least bad option 😬 😄 Should we go for it?
:tada: This issue has been resolved in version 1.8.1 :tada:
The release is available on:
v1.8.1
Your semantic-release bot :package::rocket:
The app won't work unless I disable the following:
https://github.com/relaycorp/relaynet-gateway-android/blob/28e329b9eef9c9580b5753d2e3b4e59f2cd3a44f/app/src/main/java/tech/relaycorp/gateway/App.kt#L106-L107
And @mgulyaev10 just came across the following thread-related issue: