Commit Graph

10477 Commits

Author SHA1 Message Date
Eugene Susla
0344756d19 Merge "Reduce a11y shortcut timeout from 1.5sec to 1sec" 2017-11-01 18:33:11 +00:00
Eugene Susla
c884158de1 Reduce a11y shortcut timeout from 1.5sec to 1sec
Fixes: 63914635
Test: ensure shortcut delay is still 3sec before dialog confirmation and
1sec afterwards
Change-Id: I1b9d8eeb93358d036f2f6d048f85a379d996d758
2017-10-31 17:11:45 -07:00
Winson Chung
378f389b75 Merge "Cleaning up InputConsumers" 2017-10-31 15:50:29 +00:00
Winson Chung
6463c3625f Cleaning up InputConsumers
- Log the pid and user handle for the client input consumer
- Pass token to WMS to ensure that it is notified when the client input
  consumer process is killed

Bug: 37309537
Test: android.server.am.ActivityManagerPinnedStackTests
Change-Id: I432d96b1f524ab34dbbad3eeb67d996abdd5f4ca
Signed-off-by: Winson Chung <winsonc@google.com>
2017-10-30 14:07:04 -07:00
Winson Chung
941dcba6e3 Merge "1/ Refactor out logic to fetch assist data asynchronously" 2017-10-30 16:22:26 +00:00
Felipe Leme
51e29da65e Improvements on autofill debugging.
- Sets the client-side sDebug and sVerbose in the application being autofilled
  before it was only set in the service's application
- Logs client class on AutofillManager - useful to detect cases where it's not
  an Activity.

Bug: 67742064
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: manual verification of logs

Change-Id: I1f04b90bae89fd942e5849b4a382f1f54df20e38
2017-10-27 17:32:20 -07:00
Evan Rosky
9e1c6328d2 Merge "Fixed several core and CTS tests" 2017-10-27 21:33:52 +00:00
Winson Chung
da2818fe89 1/ Refactor out logic to fetch assist data asynchronously
- This logic will also be used when the recents component is started to
  fetch assist data associated with the current activity.

Bug: 67864419
Test: com.android.server.am.AssistDataRequesterTest
Test: CtsVoiceInteractionTestCases

Change-Id: I4cb3c2536a104d7071bc0a1fd6e31dfc2c0ce8d0
2017-10-27 13:49:26 -07:00
TreeHugger Robot
599ef4698b Merge "New Autofill API: FillResponse.disableAutofill(duration)" 2017-10-27 19:38:32 +00:00
Felipe Leme
17292d1a25 New Autofill API: FillResponse.disableAutofill(duration)
This API is useful to improve the autofill performance for the scenarios where
the service knows it cannot autofill an app or activity.

Bug: 67867469

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthWhenAppCallsCancel

Change-Id: I58e3eb5714db840104e699d614e750c03e26e8ca
2017-10-27 09:40:59 -07:00
TreeHugger Robot
1b3cf5a44b Merge "Have setRelativeLayer take SurfaceControl instead of IBinder" 2017-10-27 04:48:43 +00:00
TreeHugger Robot
9bc398826a Merge "Added JNI and Java code to capture a layer" 2017-10-27 03:24:16 +00:00
Robert Carr
77e3494226 Have setRelativeLayer take SurfaceControl instead of IBinder
Avoid making the caller have a pointless call to getHandle()
ill convert the rest of the methods later, but this one is needed
for some testing requirements in the hierarchy branch.

Test: Builds
Change-Id: Ie501690c48c46872cc4641f456b3f2ba601281d0
2017-10-27 02:44:47 +00:00
Robert Carr
e625fcf325 Introduce SurfaceControl Builder API
Overloaded constructors are messy. Want builder anyway for public API
eventually.

Test: Boots. go/wm-smoke
Change-Id: I2ebc5305c608a0d626609639a4d80aebb9b5653a
2017-10-26 15:53:30 -07:00
TreeHugger Robot
2fd941b6d9 Merge "Prevent touch delegate from blocking parent events" 2017-10-25 20:11:39 +00:00
Siarhei Vishniakou
d27a6319f2 Prevent touch delegate from blocking parent events
Make sure that TouchDelegate does not interfere with
handling of parent's events, such as onClick().
Currently, the variable mDelegateTargeted is sticky,
and after the TouchDelegate is first activated,
stays true for the remainder of its life. Therefore, the
parent view will no longer receive clicks after the
TouchDelegate is first clicked. This patch forces the
re-evaluation of mDelegateTargeted on each new ACTION_DOWN
event.

Test: bit CtsViewTestCases:.TouchDelegateTest
Bug: 65392236
Change-Id: Ifa6430ce6e8400c0411df7da66281219ea97733c
2017-10-25 10:58:37 -05:00
Abodunrinwa Toki
33ff200cbf Update TextClassifier Javadoc.
Bug: 65112496
Test: none
Change-Id: Id3732a2c8ed372be0f717346e6aa92b9e614ad04
2017-10-24 20:43:49 +01:00
chaviw
1cda84c6c2 Added JNI and Java code to capture a layer
Test: Boots

Change-Id: I1d84c6ad32624513cd0124d6f67e930af655caeb
2017-10-24 11:59:17 -07:00
TreeHugger Robot
6a6fe31867 Merge "Removed .aidl files that are not used on other.aidl files." 2017-10-23 15:22:49 +00:00
Felipe Leme
25a3a5fb17 Removed .aidl files that are not used on other.aidl files.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 67867469

Change-Id: I7f598d0016d49a3956d4be00ab5acca6a62d56eb
2017-10-20 17:09:36 -07:00
TreeHugger Robot
31a7867bf8 Merge "Reduce a11y shortcut timeout after dialog confirmation" 2017-10-20 22:18:09 +00:00
TreeHugger Robot
97868f233f Merge "Easy switching of logging for TextClassifier" 2017-10-20 21:12:05 +00:00
Evan Rosky
adf5bec523 Fixed several core and CTS tests
Fixes in framework include:
- ListPopupWindow requests focus for itself so it can receive
  MENU key.
- PopupWindow uses setTransitionVisibility to avoid losing
  focus upon enter transition.
- First-traversal will explicitly handle FOCUS_AFTER_DESCENDANTS
  on the current focus if applicable -- details in code comment.

Fixes in tests usually just required focusing what they expected
to have initial focus; however, there were a couple tests that
had been broken for other reasons for a long time.

app.cts.ActionBarTest
app.cts.ToolbarActionBarTest
android.view.DisabledLongpressTest
android.widget.scroll.arrowscroll.ShortButtonsTest
android.view.VisibilityTest
android.widget.listview.ListScrollListenerTest
android.widget.listview.arrowscroll.ListOfThinItemsTest
andorid.widget.listview.arrowscroll.ListWithNoFadingEdgeTest
android.view.LongpressTest
android.widget.focus.ScrollingThroughListOfFocusablesTest
android.widget.gridview.GridScrollListenerTest

Bug: 67467972
Test: Failing tests should pass now.
Change-Id: I9e2fbfeb183eb777f35c67eca53e1f70809b7670
2017-10-20 11:10:05 -07:00
TreeHugger Robot
a18447dd4b Merge "FloatingToolbar updates" 2017-10-20 17:16:59 +00:00
Eugene Susla
5f19cd3eda Reduce a11y shortcut timeout after dialog confirmation
Bug: 63914635
Test: ensure shortcut delay is still 3sec before dialog confirmation and
1.5sec afterwards
Change-Id: Ifbc25dd2a3915809b570719ad79fbc83016989a6
2017-10-19 14:40:11 -07:00
Felipe Leme
4d14ec2c23 Make new Autofill API concretes, so they don't break support library.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testNewTextAttributes
Test: m update-api

Bug: 38323227

Change-Id: Idafb157fe9b3e96661d58923d361ea07ff2c6d40
2017-10-19 13:31:25 -07:00
TreeHugger Robot
3a88464cfc Merge "Annotate threads for some IME handling methods" 2017-10-19 07:01:10 +00:00
TreeHugger Robot
8c987db23e Merge "Fix invisible SurfaceViews" 2017-10-19 03:58:43 +00:00
Yohei Yukawa
930328ca97 Annotate threads for some IME handling methods
This is a preparation to work on Bug 36897707.

For instance, the reason why most of IME-related callbacks in
InputMethodService get called on the main thread is because
IInputMethodWrapper keeps forwarding incoming IPCs into the
main looper of the IME process as follows:

  InputMethodManagerService (IMMS)
        ------
    -> one-way binder IPCs over	IInputMethod
        ------
      -> IInputMethodWrapper (on the binder thread(s))
       -> Handler (to dispatch tasks to main thread)
        -> InputMethodImpl.* (on the main thread)
         -> InputMethodService.* (on the main thread)

By adding explicit annotations such as @BinderThread and @MainThread
in relevant methods, this CL makes that kind of investigation much
easier than before.

Bug: 36897707
Test: compile
Change-Id: I8f9afe9a1986a9fa41fb66fdc64e8f0f67e45c2e
2017-10-18 20:19:53 -07:00
Robert Carr
2b8a5e11dc Fix invisible SurfaceViews
Of course OPAQUE != SURFACE_OPAQUE: that would be too easy.

Test: Manual
Bug: 67896876
Change-Id: Ic7aaae42c7de8195c474c39d850f2a07a58ccc9d
2017-10-18 18:46:27 -07:00
TreeHugger Robot
6fff7baca2 Merge "Sync of SmartSelection.java wrapper from Google3 to support the new annotate call, and alternative ways of construction." 2017-10-18 15:08:27 +00:00
Lukas Zilka
9d6e9d7090 Sync of SmartSelection.java wrapper from Google3 to support the new annotate call, and alternative ways of construction.
Bug: 67618889
Test: Builds. Works in Google3.
Change-Id: I3b67235c969178966c784d13a091ca404d598488
2017-10-18 11:59:35 +02:00
TreeHugger Robot
b5a52f9026 Merge "Minor logging improvements on Autofill." 2017-10-18 01:21:09 +00:00
Felipe Leme
686128ef59 Minor logging improvements on Autofill.
Test: manual verification

Fixes: 67898895

Change-Id: Ic97d51a388a426b3ff9e74520f52036257a5c1ce
2017-10-17 14:02:58 -07:00
Sunny Goyal
c10432079d Using hardware canvas for profiling Views
Using software canvas when profiling views does not give the
correct result as by default apps expect hardware canvas. Also
it prevents crashes when a view is drawing hardware bitmap.

Test: Manually tested using hierarchy viewer
Change-Id: I9e0fffbdac3209f1bc68c1a383bdaa92976addca
2017-10-17 12:23:12 -07:00
Abodunrinwa Toki
786188536f Easy switching of logging for TextClassifier
This way there is a single switch for detailed logging vs summarised
logging. We can keep the switch on in development but limit the logs
in production devices.

Test: manually tested log switch turned on/off.
Change-Id: I8ad291b19554f393a05fbc7cae3d545163d21a99
2017-10-17 15:35:44 +01:00
Abodunrinwa Toki
9c881f227b FloatingToolbar updates
- Replace SHOW_AS_OVERFLOW_ALWAYS with SHOW_AS_ACTION_NEVER
 - MenuItem ordering
 - Allow textAssist items in overflow to show text with images
 - MenuItem label text now standard case (not allcaps)

Bug: 62447250
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I07fa06f433a34adfad20b371417c95ce76422456
2017-10-16 21:27:54 +01:00
TreeHugger Robot
049b12a9cc Merge "Process joystick MotionEvents correctly." 2017-10-13 21:01:39 +00:00
TreeHugger Robot
f32edc9f65 Merge "Replace mNotifyAutofillManagerOnClick by mPrivateFlag." 2017-10-13 18:31:52 +00:00
TreeHugger Robot
02a20b7025 Merge "Added new ViewNode properties for Autofill (minEms, maxEms, maxLength)." 2017-10-13 18:13:04 +00:00
Felipe Leme
f39c3c1395 Replace mNotifyAutofillManagerOnClick by mPrivateFlag.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 67006548

Change-Id: I2027e5d6d952b473c4d20b2aac15792d230ae43c
2017-10-13 09:37:24 -07:00
Siarhei Vishniakou
461faf9d0e Process joystick MotionEvents correctly.
Joystick MotionEvents, such as AXIS_HAT0Y and AXIS_HAT0X,
are translated into KeyEvents KEYCODE_DPAD_UP,
KEYCODE_DPAD_DOWN, etc for navigating menus. When two or more
AXIS_HAT0Y events are batched into a single event, this would
not be recognized by the SyntheticJoystickHandler as a down/up
event, thus missing the event entirely. This commit updates
SyntheticJoystickHandler to use the entire MotionEvent,
including the HistoricalEvent portions.

Bug: 36069459
Test: Connected Sony DS4 joystick, recorded the event
that reproduces the bug with inputstudio. Replayed the
event after patch, the bug could not be reproduced.

Change-Id: I7c15c3a7c9ac326481214b1f6b553ae39c459bc4
2017-10-12 21:09:22 -07:00
TreeHugger Robot
8ff1a4b14c Merge "Fix identation in the switch block." 2017-10-13 03:21:57 +00:00
TreeHugger Robot
f055302a73 Merge "Flags to enable/disable smart selection in EditText" 2017-10-13 00:33:44 +00:00
Abodunrinwa Toki
0e6b43ed58 Flags to enable/disable smart selection in EditText
1. smart_selection_enabled_for_edit_text
   Disables smart selection for editable text.
2. smart_selection_dark_launch
   Dark launch TextClassifierImpl.suggestSelection(...)
   In this mode we run the method, but never change the user's
   selection to measure the quality of the results based on what
   the user actually wanted.

Bug: 65959640
Test: Manually tested flags turn on/off feature with 'adb shell
settings put global' and GServices override.
Test: bit FrameworksCoreTests:android.provider.SettingsBackupTest
Change-Id: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
2017-10-12 23:50:53 +01:00
TreeHugger Robot
fac6655cf5 Merge "New Autofill API: SaveInfo.setTriggerId()" 2017-10-12 22:39:49 +00:00
Rob Carr
53966760d7 Merge "Use new SurfaceFlinger transaction API." 2017-10-12 22:08:03 +00:00
Siarhei Vishniakou
27358ef48d Fix identation in the switch block.
Currently, case and switch start at the same
ident level, which fails the presubmit hooks.

Test: make
Change-Id: I4e22fe0c633541c00cfda3ed27731f78490e8fae
2017-10-12 13:03:22 -07:00
Felipe Leme
a937238eae Let service set the SaveRequest.getClientState() on dataset auth responses.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnIntentOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnFillResponseOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnIntentAndFillResponse

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnIntentOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnFillResponseOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnIntentAndFillResponse

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 67588471

Change-Id: I05a56bfc02400ce87077c93301abc0e0e1aa59a6
2017-10-12 12:03:42 -07:00
Felipe Leme
2fe3ade813 New Autofill API: SaveInfo.setTriggerId()
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButton
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButtonWhenAppClearFields
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 65118073
Fixes: 67006548

Change-Id: Id12179086567d014f35fe4177b041745fb19bafd
2017-10-12 09:55:45 -07:00