summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2019-01-18 09:17:16 -0800
committerYohei Yukawa <yukawa@google.com>2019-01-18 09:17:16 -0800
commit9f141ee80230f266caa596a60e6d1278f072ac7c (patch)
treec69adb1f75d9f120c44e6522acd64dc14444da49 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent5daa35687a06caaca19de8274b5c58ed3388c378 (diff)
Plumb Context#mUser to TextServicesManager to TextServicesManagerService
This is a follow up CL to our previous CL [1], which enabled spell checker for background users. In that CL, we assumed that spell checker user ID can and should always be determined by the calling user ID. This assumption is not valid at least for direct-reply notifications on System UI, because System UI always runs as user 0 no matter who is the current active user. In order to allow TextServicesManagerService (TSMS) connect to the right user for such a special use case, this CL introduces a hidden parameter "userId" to each IPC so that clients that have INTERACT_ACROSS_USERS_FULL can override the target user ID when necessary. For instance, to interact with user 10's spell checker services, you can obrain a special instance of TextServicesManager as follows. TextServicesManager tsmForUser10 = context .createPackageContextAsUser("android", 0, 10 /* userId */) .getSystemService(TextServicesManager.class) If the calling process does not belong to user 10, any operations on that TextServicesManager will result in SecurityException unless the calling package needs to have INTERACT_ACROSS_USERS_FULL. This CL is just a preparation. There should be no user-visible behavior change yet. [1]: I06c27ef834203a21cc445dc126602c799384527b 06a2624049f09e1ad68f8ab74fdb525aacd5c1e5 Bug: 123043618 Test: spell checker still works Change-Id: I31dda3ae8795190d44b0622b8335c34ddbc5dd48
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions