Skip to content

Commit 3d2e247

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
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 example
1 parent ddd4ed0 commit 3d2e247

173 files changed

Lines changed: 548 additions & 4719 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: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

accounts/init.go

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

app/admin/device_policy_manager.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)