Commit Graph

10459 Commits

Author SHA1 Message Date
Abodunrinwa Toki
33ff200cbf Update TextClassifier Javadoc.
Bug: 65112496
Test: none
Change-Id: Id3732a2c8ed372be0f717346e6aa92b9e614ad04
2017-10-24 20:43:49 +01: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
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
Phil Weaver
b19789f80a Merge "Don't recycle replaced nodes in a11y cache" into oc-mr1-dev am: 15c8747ad9
am: 73e2acb9ae

Change-Id: I906748223efd88d5d48889b2866725ba13c0268e
2017-10-12 02:30:42 +00:00
Phil Weaver
9704426d14 Don't recycle replaced nodes in a11y cache
This is a patch for another bug. When the cache refreshes
nodes, it marks the transaction to bypass the cache. We
still, however, replace the cached node. If we recycle
the node as well, we end up refreshing it after it's been
recycled and end up with a sealed node in the cache. That
node can then be obtained and then throw an exception when
a setter is called. These exceptions are almost impossible
to debug.

I'm going to leave the bug open to roll this CL back and
fix the cache's behavior, but this fix seems safer this
late.

Bug: 35626351
Test: Ran a11y CTS and unit tests. Verified on instrumented
master build that the error indeed goes away. Removing one
line from unit tests that requires recycling.

Change-Id: Icc9a43ee49cf7c6bfa996839b35954faaf31621c
2017-10-11 15:51:33 -07:00
TreeHugger Robot
f65d166959 Merge "Removed remaining use of static stack ids." 2017-10-11 21:27:05 +00:00
Wale Ogunwale
44f036fd5a Removed remaining use of static stack ids.
Replace by windowingMode and activityType.

Test: Existing tests pass.
Test: go/wm-smoke
Bug: 64146578
Change-Id: I2ff026de3ead1a3e7136df17c68ed37d7aae5495
2017-10-11 07:40:46 -07:00
Robert Carr
e13b58e15b Use new SurfaceFlinger transaction API.
For now we reimplement global transactions in the Java side
JNI layer.

Bug: 64815723
Bug: 64816140
Bug: 64815766
Test: Existing tests pass. go/wm-smoke
Change-Id: I6c0a7b5e65b1b6cc844ac61f3269629af60a4244
2017-10-09 16:52:48 -07:00
John Reck
949cfe1018 Deprecate view drawing cache
Test: Looked at docs

Change-Id: I95a487d126bd15a4085e777d58c60b6342ee64a8
2017-10-09 16:10:37 -07:00
Felipe Leme
aa7e2294be Added new ViewNode properties for Autofill (minEms, maxEms, maxLength).
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testNewTextAttributes
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 38323227

Change-Id: I6d8606f2d0668644ae1bd33e982edef0ec1e8e63
2017-10-06 15:55:19 -07:00
TreeHugger Robot
75f4b23500 Merge "An update on dirty rect invalidates" 2017-10-06 01:10:54 +00:00
John Reck
a53402084e An update on dirty rect invalidates
Bug: 67104277
Test: looked at docs
Change-Id: Ieb97c73bb8d63fddb232534e54091a73303e2258
2017-10-05 14:49:22 -07:00
TreeHugger Robot
d5ad2ff575 Merge "Clarify that getLocalState is always valid for DragEvent" 2017-10-05 19:03:54 +00:00
Evan Rosky
22113f0423 Merge "Enable new initial-focus behavior for P" 2017-10-05 00:29:16 +00:00
Felipe Leme
e541b65c03 Merge "Sets AutofillClient on attachBaseContext()" into oc-mr1-dev am: 6d17d9d0cf
am: 63b45a87d5

Change-Id: Ib7ae51cf0336c4cea8ff90d60995816d43b3fa36
2017-10-04 22:42:29 +00:00
Felipe Leme
bb567ae6c0 Sets AutofillClient on attachBaseContext()
When an activity overrides attachBaseContext(), the attached context must share
the same AutofillCient, otherwise it will break autofill in the activity.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.AttachedContextActivityTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 67350639

Change-Id: I6b0c4c2fab5fa68eb6ee0714e107ca0816efb2cb
2017-10-04 12:23:23 -07:00
Andrei Stingaceanu
6c591dd3c3 Merge "[Magnifier - 1] Initial implementation and wiring" 2017-10-04 09:38:53 +00:00
Felipe Leme
114a441554 Added ViewNode.getWebScheme().
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAssistTestCases

Fixes: 65207762

Change-Id: Ia8f7b3f5fce8cf0cc783e861fd7e1f1f7f78db19
2017-10-03 14:54:49 -07:00
Andrei Stingaceanu
d2eadfa4b1 [Magnifier - 1] Initial implementation and wiring
* implementation of a magnifier which can be attached to any view
* important APIs:
** show(float centerXOnScreen, float centerYOnScreen, float scale)
** dismiss()
* smart offset => shows below if there is no space above
* controlled by boolean flag (easy to turn off)
* attached the magnifier to Editor's handles
* vertically snaps to the middle of the line containing the
  selection
* horizontally snaps to the offset of the character where
  the selection starts/ends

Bug: 66657373
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: manual test that shows the magnifier working
Change-Id: I1d4616b8bb1210d869ac47dca137ea9636355250
2017-10-03 16:45:54 +01:00
Jorim Jaggi
6c23b00b46 Merge "Fix crash when dumping empty LayoutParams" 2017-09-29 10:43:47 +00:00
Jan Althaus
3bf929524d Merge "Adding multiple action support to TextClassification" 2017-09-29 10:41:09 +00:00