commit | 3361faf975f292981567dd20f2725700e1325f20 | [log] [tgz] |
---|---|---|
author | Andrey Epin <ayepin@google.com> | Mon Aug 21 15:30:42 2023 -0700 |
committer | Andrey Epin <ayepin@google.com> | Fri Sep 29 09:06:34 2023 -0700 |
tree | 3fde22c2e0b936210da791d0b5b1cafeadf72e84 | |
parent | 4398e94720035edeb6c2ee7becf0b8b606c378f2 [diff] |
A workaround for ChooserActivity memory leak Add ScopedAppTargetListCallback class to wrap AppPredictor callbacks that breaks the callback reference chain when the specified scope gets closed. Bug: 290971946 Test: Launch Chooser multiple times in a row, collect heapdump with a forced garbage collection, verify that: * there are no ChooserActivity objects in the dump; * there are multiple ScopedAppTargetListCallback instances in the dump with AppPredictor$CallbackWrapper in their GC root path. Test: manual functionality smoke tests: activity configuration changes, pinning targets (all triggers content reloading). Test: unit tests Change-Id: I5099eb7527098a90b3e00bb848eb41e2bc7d14d6
IntentResolver
provides the implementation for Intent ACTION_CHOOSER
See also: ShareCompat.IntentBuilder