Commit 4b0ac56
committed
fix: keep ComponentCallbacks2 implementations from R8 devirtualization
R8 aggressively optimized ComponentAppearanceCallback's empty onTrimMemory/
onLowMemory bodies, causing the Class object itself to be registered as a
ComponentCallbacks2 instead of the instance. When Android dispatched
onTrimMemory on backgrounding, this threw AbstractMethodError on
java.lang.Class<cm> and crashed the release build.
Add a ProGuard keep rule to preserve all ComponentCallbacks2 implementations'
interface methods intact.1 parent 7d0147b commit 4b0ac56
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
0 commit comments