Skip to content

Commit cd3a798

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: additional bug fixes — CharSequence crash, local ref leaks, race conditions
Template fixes (regenerated all packages): - Fix CharSequence return values unsafely cast to jstring — now returns *jni.Object instead of string to prevent JNI crash on non-String CharSequence implementations (SpannableString, StringBuilder, etc.) - Fix local ref leak on GlobalRef promotion — save and delete original local ref after NewGlobalRef - Fix local ref leak for string parameters — add deferred DeleteLocalRef - Remove initSkipped dead code from all init.go files Spec fixes: - Fix NetworkCapabilities unexported type name (workCapabilities → NetworkCapabilities) Hand-written code fixes: - alarm/extract.go: add ShowIntent field, fix local ref leak - location/extract.go: add Altitude/Bearing/Speed/Accuracy/Time fields, fix local ref leaks - speech/new_tts.go: fix local ref leaks - bluetooth/new_adapter.go: fix BluetoothManager GlobalRef leak - proxy.go: protect SetProxyClassLoader with mutex, fix doProxyInit GlobalRef leak on partial failure - intent_extra.go: fix local ref leaks in Put*Extra, fix GetBoolExtra error swallowing - notification_extra.go: fix local ref leaks in NewChannel/NewBuilder - graphics_extra.go: cache ARGB8888/MonospaceTypeface with sync.Once, fix local ref leaks in NewCanvas/NewPaint ui.go fixes: - Fix renderText GlobalRef leaks (Canvas/Paint never freed, plus early return paths) - Fix data race: run function goroutine now uses local buffer - Fix ignored NewStringUTF errors in permission handling Example fixes: - Remove capi imports from all 53 examples (use new jni.ObjectFromPtr) - Fix clipboard example for CharSequence API change
1 parent ea1f6f1 commit cd3a798

132 files changed

Lines changed: 4660 additions & 1381 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

accounts/account_manager.go

Lines changed: 42 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)