Commit cd3a798
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 change1 parent ea1f6f1 commit cd3a798
132 files changed
Lines changed: 4660 additions & 1381 deletions
File tree
- accounts
- app
- admin
- alarm
- blob
- download
- job
- notification
- role
- usage
- bluetooth
- le
- companion
- content
- clipboard
- pm
- preferences
- resolver
- examples
- clipboard
- common/ui
- graphics/pdf
- hardware
- biometric
- camera
- ir
- lights
- usb
- location
- media
- audiomanager
- audiorecord
- player
- projection
- recorder
- ringtone
- session
- net
- nsd
- vpn
- wifi
- p2p
- rtt
- nfc
- os
- build
- environment
- keyguard
- power
- storage
- vibrator
- print
- provider
- documents
- media
- se/omapi
- spec/java
- speech
- telecom
- telephony
- templates/java
- tools/pkg/javagen
- view
- display
- inputmethod
- widget/toast
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments