summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2019-01-08 16:45:34 -0800
committerYohei Yukawa <yukawa@google.com>2019-01-08 16:45:34 -0800
commita7babbbf0029497c602863937cae803fdc834fd3 (patch)
treef6e2692de80c1cc24b668771f5dd4e9b6a2dc4dc /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent95cb8e40ca343486f24fd8b03eaf8180a6e488a4 (diff)
Add a debug command to poll IMMS.Lifecycle#onSwitchUser()
This is a quick workaround for a known limitation that adb shell am switch-user <user id> doesn't wait until com.android.server.SystemService#onSwitchUser() gets called. The problem is that UserController.switchUser() immediately returns soon after enqueuing a task to call back SystemService#onSwitchUser(). This means that on a slow device / environment, there is a chance that IMMS continues behaving as if a previous user was still interacting after switching a user. Ideally there should be a way to wait until all system servers finish handling SystemService#onSwitchUser() in am shell commands, but it may require non-trivial amount of changes in ActivityManagerShellCommand. In order to unblock on-going per-profile IME effort, this CL exposes an internal state of InputMethodManagerService (IMMS) so that CTS tests can wait until IMMS.Lifecycle#onSwitchUser() gets called with an expected user ID as a quick workaround. Bug: 120784635 Bug: 122469833 Test: adb shell cmd input_method get-last-switch-user-id Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases Change-Id: I07a0120d44bcb3e3d60d51c510e7e566ce424148
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions