Require TEST_INPUT_METHOD instead in IMM#addVirtualStylusIdForTestSession()
This is a follow up CL to our previous CL [1], which introduced an @TestApi
InputMethodManager#addVirtualStylusIdForTestSession(),
which internally requires INJECT_EVENTS permission.
Now that TEST_INPUT_METHOD is also available [2], let's require it
instead of INJECT_EVENTS for better consistency with other test APIs
defined in InputMethodManager.
This CL also add @RequiresPermission(TEST_INPUT_METHOD) to
InputMethodManager#addVirtualStylusIdForTestSession()
to make it clear that it's guarded with the permission.
[1]: I7399c0a56c04f024d65c16d459818cc2c5cdbc7f
d96ef57b
[2]: Ie79a3e9d41ce22605ae083594d639c37d08b7def
b869c783
Bug: 256239860
Test: atest CtsInputMethodTestCases:StylusHandwritingTest
Change-Id: Icdbb4ade2bd4b5066984e209efcf0ca93bfa08ca
Loading
Please register or sign in to comment