Files
frameworks_base/core/java/com/android
Yohei Yukawa cba800ef2f 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
      d96ef57bc4
 [2]: Ie79a3e9d41ce22605ae083594d639c37d08b7def
      b869c78380

Bug: 256239860
Test: atest CtsInputMethodTestCases:StylusHandwritingTest
Change-Id: Icdbb4ade2bd4b5066984e209efcf0ca93bfa08ca
2022-10-28 19:53:46 -07:00
..
…
2022-10-13 15:54:15 +00:00