Update #testSetCursor for md touchmode
Touch mode is now per display and detached views return what is set
in config_defaultInTouchMode for View#isInTouchMode.
testSetCursor requires the AdaptorView's touch mode to be false (this
condition was true even before multi-display touch mode changes).
Since AdaptorView is a detached view, in this fix, if default touch mode
is set to true, we attach mListView to the activity, set touch mode to
false, and finally re-attach the list adaptor.
This CL was tested with both config_defaultInTouchMode set to true and
set to false.
Updated this test to use ActivityScenarioRule instead of extending
ActivityInstrumentationTestCase2, since ActivityInstrumentationTestCase2
doesn't support assumptions.
Bug: 250825893
Test: atest AlertDialog_BuilderCursorTest
Change-Id: I3225859223502f559f4946c20f7f49d9792dc7b2
1 file changed