Commit f1bbe36
committed
[Microsoft.Android.Sdk.ILLink] fix crash when TZ changes
Fixes: #7953
When a timezone changes in a `Release` app, it can crash with:
[monodroid] Unable to find Android.Runtime.AndroidEnvironment.NotifyTimeZoneChanged()!
In 11f0e1b, we removed the line:
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="Mono.Android">
-- <type fullname="Android.Runtime.AndroidEnvironment" />
Unfortunately, this method is called from native code, so we need to
*always* preserve it.
Added a test for this scenario, we may want to audit all
`mono_class_get_method_from_name` calls and add more tests cases.
I also cleaned up the tests a bit with a `getResource()` local function.1 parent ecb207b commit f1bbe36
File tree
4 files changed
+42
-20
lines changed- src/Microsoft.Android.Sdk.ILLink/PreserveLists
- tests/MSBuildDeviceIntegration
- Resources/LinkDescTest
- Tests
4 files changed
+42
-20
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 14 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 403 | + | |
407 | 404 | | |
408 | 405 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 406 | + | |
413 | 407 | | |
414 | 408 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
419 | 413 | | |
420 | 414 | | |
421 | 415 | | |
| |||
424 | 418 | | |
425 | 419 | | |
426 | 420 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 421 | + | |
431 | 422 | | |
432 | 423 | | |
433 | 424 | | |
| |||
450 | 441 | | |
451 | 442 | | |
452 | 443 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 444 | + | |
457 | 445 | | |
458 | 446 | | |
459 | 447 | | |
| |||
512 | 500 | | |
513 | 501 | | |
514 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
515 | 509 | | |
516 | 510 | | |
517 | 511 | | |
| |||
0 commit comments