summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHai Zhang <zhanghai@google.com>2021-01-13 03:32:40 -0800
committerHai Zhang <zhanghai@google.com>2021-01-13 15:00:37 -0800
commita95881f6caad848d41eb10436d345915bd4e0e2e (patch)
tree40716144a0a79344be45d7f2963100de8a7b1a51 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentbb45c563c4b28fecf07d5f88240da9271c9b49e8 (diff)
Use API for binding service with custom user and executor.
There is actually already a public API overload for Context.bindService() which allows binding the service with the user of Context.getUser() and a custom Executor. We can construct an Executor from our Handler, but this executor is required to remain the same instance for different calls to bindService() for the same ServiceConnection by the API, so we should keep the Executor instance, as well as the Handler instance, instead of calling getJobHandler() every time. In fact getJobHandler() is already required to return the same instance, or bindServiceAsUser() would have thrown the same exception for different Handlers. Also removed a check in ContextImpl.bindService() to allow mainline modules to use the bindService() API with Context multi-user. Bug: 158736025 Test: presubmit Change-Id: I95717a4a74267dff4fbe1898a82cdfa7f195cc06
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions