Commit 79f6b65
Fix Android startup crash: guard native bridge type loading and protect Battery API
- Guard stopOboeBridge()/stopVulkanProbe() calls with nativeBridges != null
check to prevent JIT compilation of [NoInlining] helpers during the
initial false→false callback, which would otherwise trigger type loading
of AndroidNativeBridgeManager (and potentially cascade to native P/Invoke
types on Samsung devices).
- Guard disposeNativeBridges() in Dispose with the same null check.
- Wrap AndroidBatteryInfo.ChargeLevel and OnBattery in try-catch to prevent
MAUI Essentials Battery API crashes on Samsung devices with aggressive
battery optimization.
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/7246c167-0b69-48a2-9b47-0771fe6d1e63
Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>1 parent 4268e03 commit 79f6b65
1 file changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
368 | 382 | | |
369 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
370 | 397 | | |
371 | 398 | | |
372 | 399 | | |
0 commit comments