Open yunikkk opened 2 years ago
It seems that problem is not really related to our code.
Choreographer
instance has thread local instance that could be actually disposed but method is hidden, https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/Choreographer.java#318. It was added at https://android.googlesource.com/platform/frameworks/base/+/ac04f4e69a6de138c5afc668a2c89b7da7ff4e6a for the internal usage within the SDK to release file descriptors faster and not rely on GC.
There are examples of reflection that make use of this method https://github.com/bilibili/DanmakuFlameMaster/issues/376, we could potentially do the same thing if for some reason decide it's good optimization.
@yunikkk
Hi, any update for this issue pls?
@samirasalah no updates so far. The hack calling Choreographer.releaseInstance
using reflection won't work on modern devices since it's blacklisted in the 8+ Androids, e.g. https://developer.android.com/guide/app-compatibility/restrictions-non-sdk-interfaces from the csv :
Landroid/view/Choreographer;->releaseInstance()V,lo-prio,max-target-o
.
I'm afraid the only thing to do is to disable / configure StrictMode to ignore this specific issue.
@yunikkk thank's for your reply. Have a nice day
Issue moved from #863, cc @alexzatsepin
This issue can be easily reproduced if the following StrictPolicy enabled:
Steps to reproduce:
Actual result:
Environment: Samsung galaxy TAB S5e, Android 11 Xiaomi MI 10 Lite, Android 11