Commit 3d2e247
fix: comprehensive bug fixes across codebase (~100 bugs)
Critical fixes:
- Fix CallObjectMethod/CallStaticObjectMethod/etc returning non-nil
*Object for Java null -- template-level fix, callers can now use
nil checks correctly
- Fix NewManager double-GlobalRef leak: GetSystemService already
returns GlobalRef, don't wrap again (template fix, 34 managers)
- Fix ContextFromObject Close() double-free: now creates own GlobalRef
- Fix ExtractBundle returning unusable Bundle (nil VM field)
- Fix proxy doProxyInit leaking GlobalRefs on partial failure
- Fix SetProxyClassLoader race condition (now mutex-protected)
env.go nil-return fixes (template-level):
- All Object-returning JNI functions now return nil for Java null
instead of non-nil *Object with zero ref
Local ref leak fixes:
- Intent PutStringExtra/PutIntExtra/PutBoolExtra: free jKey/jVal/cls
- Intent NewIntent: free cls and original local ref after NewGlobalRef
- Notification NewChannel/NewBuilder: free string local refs
- PDF NewCanvas/NewPaint: free original local ref after NewGlobalRef
- Bluetooth NewAdapter: free BluetoothManager GlobalRef after use
- ARGB8888/MonospaceTypeface: cache with sync.Once to avoid leak
Error handling fixes:
- Intent GetBoolExtra now returns error instead of swallowing it
- proxy_invoke: add ExceptionCheck after getName() call
- proxy_invoke: delete 'other' local ref in equals branch
Code quality fixes:
- Remove initSkipped dead code from all 59 init.go files (template)
- Remove ReturnConversionCode dead function
- Merge: don't mutate input spec's IntentExtras slice
- specgen: escape string constant values with strconv.Quote
Example fixes:
- Add ObjectFromPtr to avoid capi imports in all 53 examples
- Add sync.Mutex for outputBuf race condition in ui.go
- Add SCHEDULE_EXACT_ALARM permission for alarm example
- Fix app_framework ignoring SetAction error
- Add defer mgr.Close() for usage example1 parent ddd4ed0 commit 3d2e247
173 files changed
Lines changed: 548 additions & 4719 deletions
File tree
- accounts
- app
- admin
- alarm
- blob
- download
- job
- notification
- role
- usage
- bluetooth
- le
- companion
- content
- clipboard
- pm
- preferences
- resolver
- examples
- accounts
- alarm
- app_framework
- audiomanager
- battery
- biometric
- bluetooth
- build_info
- camera
- clipboard
- common/ui
- companion
- credentials
- display
- documents
- download
- environment
- health
- inputmethod
- ir
- job
- keyguard
- keystore
- lights
- location
- mediastore
- net
- nfc
- notification
- nsd
- omapi
- pdf
- permission
- player
- pm
- power
- preferences
- print
- projection
- recorder
- resolver
- session
- settings
- speech
- storage
- telecom
- telephony
- toast
- usage
- usb
- vibrator
- wifi_p2p
- wifi_rtt
- wifi
- graphics/pdf
- hardware
- biometric
- camera
- ir
- lights
- usb
- location
- altitude
- media
- audiomanager
- audiorecord
- player
- projection
- recorder
- ringtone
- session
- net
- nsd
- vpn
- wifi
- p2p
- rtt
- nfc
- os
- battery
- build
- environment
- keyguard
- power
- storage
- vibrator
- print
- provider
- calendar
- contacts
- documents
- media
- se/omapi
- speech
- telecom
- telephony
- templates
- java
- jni
- tests/e2e
- tools/pkg
- javagen
- jnigen
- specgen
- 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.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments