commit | e7e3f788b64f5b33ffde5df8471c9d82565c8a95 | [log] [tgz] |
---|---|---|
author | mrenouf <mrenouf@google.com> | Mon Mar 11 10:07:46 2024 -0400 |
committer | Mark Renouf <mrenouf@google.com> | Tue Mar 12 17:00:34 2024 +0000 |
tree | f4891138c33fef99eb9bbd5095822c5602e50340 | |
parent | 01d9014ba14b33f76c09bd1901224f7e674eefff [diff] |
UserScopedService: Cache and share contexts This change caches both the Context and the Service instance to reuse both as needed. Previously a new Context is created for every service for a given user. In addition, switch to LruCache instead of a plain main, which provides an upper bound on the number of cached instances as a safeguard. Finally, switch the key to UserHandle to decouple from other sharesheet concepts. This mechanism is an implementation detail and not for general use so framework types are fine here. Bug: 324428064 Test: Not yet used Flag: Not yet used Change-Id: I0115853f0c8888d59ebb0407391a1e6d3c6e7e6c
IntentResolver
provides the implementation for Intent ACTION_CHOOSER
See also: ShareCompat.IntentBuilder