Commit Graph

11789 Commits

Author SHA1 Message Date
TreeHugger Robot
18ff896138 Merge "Introduce Message.USER_LOCAL and added logic to map person to user id" 2018-11-27 13:44:39 +00:00
TreeHugger Robot
88dbb1b2d4 Merge "Make View#transformMatrixToLocal/Global public" 2018-11-27 12:53:16 +00:00
Abodunrinwa Toki
8df4152469 Merge "Introduce Translate intent." 2018-11-27 12:09:26 +00:00
Clara Bayarri
c127cbe76c Make View#transformMatrixToLocal/Global public
These methods are being reflected into and seem generally useful
to developers.

Bug: 117521349
Bug: 117521191
Test: new CTS in topic
Change-Id: I86e8a379e458aefe7fb2fe936b57eeeffa5ad42d
2018-11-27 09:37:23 +00:00
Felipe Leme
fc8b2460c3 Merge "Initial implementation of Augmented Autofill." 2018-11-27 06:46:20 +00:00
Felipe Leme
284ad1c3e2 Initial implementation of Augmented Autofill.
Augmented Autofill is a mechanism that will let a system-provided service
provide autofill suggestions when the stardand autofill can't.

Because the Augmented Autofill service is a system app, it has less restrictions
than the standard service; in particular, this service will be responsible for
drawing the autofill UI, although the framework will provide a mechanism to host
the window. Right now, it's creating a TYPE_APPLICATION_OVERLAY window in the
service process roughly below the focused view, but in the long-term it will
use the IME suggestion window to display it.

This CL provides the initial APIs and end-to-end workflow for the simplest
scenario, but it's still full of TODO's.

Test: atest CtsAutoFillServiceTestCases # to make sure it doesn't break it
Test: atest FrameworksCoreTests:SettingsBackupTest
Test: mmm -j150 packages/experimental/FillService &&\
  adb install -r ${OUT}/data/app/FillService/FillService.apk &&\
  adb shell settings put secure intel_service foo.bar.fill/.AiaiService &&\
  adb shell settings put global autofill_smart_suggestion_emulation_flags 2 &&\
  adb shell pm grant foo.bar.fill android.permission.SYSTEM_ALERT_WINDOW

Bug: 119638877

Change-Id: I8d59b4eab3e530cd89b81456681a72fdab532756
2018-11-27 05:09:06 +00:00
TreeHugger Robot
5023323520 Merge "Fixed ViewNode.setText(...)" 2018-11-27 05:00:05 +00:00
Felipe Leme
e56d191ed5 Fixed ViewNode.setText(...)
Bug: 111276913
Test: manual verification

Change-Id: If5bec7931a6ca6e4f05c79bf9bbb98ff5179cb98
2018-11-26 14:05:14 -08:00
TreeHugger Robot
6d45ba0491 Merge "Simplified View.onProvideContentCaptureStructure()" 2018-11-26 19:17:02 +00:00
Tony Mak
f99ee17fc0 Introduce Message.USER_LOCAL and added logic to map person to user id
1. Introduce Message.USER_LOCAL to allow caller to specify which
   message is from the local user.

2. TextClassifierImpl will now encode the Person object to a user
   id.

3. Fixed a bug in Person.equals check

BUG: 111437455
BUG: 111406942

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ActionsSuggestionsHelperTest.java

Change-Id: I6629f42244a402fa210f87afa88a629c2ca4a510
2018-11-26 18:33:16 +00:00
Clara Bayarri
c90e782c71 Restrict unsupported API usage to View#mParent/mTop/mLeft/mRight/mBottom
All these properties have getters and setters since API 11 and
should be accessed via those.

Bug: 117521221
Bug: 117520719
Bug: 117521672
Test: none
Change-Id: Id96421370abf6d9417d7411698aae7603c1e0ff1
2018-11-26 12:50:40 +00:00
Clara Bayarri
9424812311 Restrict unsupported API usage to View#mMinWidth/Height
This data is directly accessible via getMinimumWidth (API 16)
and setMinimumWidth (API 1). Also exposed in androidX via
ViewCompat

Identical for Height methods

Bug: 117521509
Bug: 117521475
Test: none
Change-Id: I2e92574acd053aecec9c992a89ee57fd9785415e
2018-11-26 12:14:03 +00:00
Tiger Huang
3d373af66d Merge "Let System UI show on external displays (1/3)" 2018-11-22 11:44:05 +00:00
Tiger Huang
7c610aaab3 Let System UI show on external displays (1/3)
Let each display have one status bar and one navigation bar. This is
so on each display, status bar and navigation bar can be laid out with
apps and produce proper insets.

Bug: 117474929
Test: atest com.android.server.wm
Test: Watch YouTube video in fullscreen mode, and see if status bar
      and navigation will be hidden as expected. Swipe on the edge
      of screen and see if status bar and navigation bar are both
      shown as expected.

Change-Id: I1550659b7cd1dd1676bf04483c5b68376ef42905
2018-11-22 17:58:06 +08:00
Abodunrinwa Toki
4bad09cd1d Introduce Translate intent.
Action: ACTION_TRANSLATE
Text: EXTRA_TEXT

TODO: Consider introducing a "translate" schema to pass the text to
translate instead of using a string extra to define this.

Bug: 116020587
Test: manually tested by selecting foreign language text and watching
      for a "Translate" action.
Change-Id: I046157f4b3e1aa60afaf3f123fdeecf406f712dc
2018-11-21 21:01:17 +00:00
Tony Mak
0be540b227 Add detectLanguage and suggestConversationActions to TCS
BUG: 111406942
BUG: 111437455

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextClassifierTest.java

Change-Id: Iee9c970ebbec6590906907d67be3dd4021c1b4b2
2018-11-21 15:36:11 +00:00
Felipe Leme
2eadd14d5a Merge "Minor changes on IntelligenceManager APIs." 2018-11-20 00:09:31 +00:00
Felipe Leme
29397ce998 Temporarily disabled IntelligenceService.
It's not properly ignoring events when the service is not set, which is causing
issues on some apps.

Fixes: 119659731
Test: manual verification

Change-Id: Ie271b8fcfde0bc2a5d6bf7c73b88bd6c48d50fdb
2018-11-16 18:13:30 -08:00
Vishnu Nair
e626d58c1b ViewRoot: Notify app when surface is released from setWindowStopped
NativeActivities do not receive onNativeWindowDestroyed callback when the activity is stopped. If
the app still uses the window object after the window is destroyed, the app can crash.

Test: run native-plasma from Android NDK. Launch activity & press home. Verify from the logs app
receives onNativeWindowDestroyed callback when its stopped.

Bug: b/111948775
Change-Id: I1de76feb7f4974b77b42b56e592ff6444713c699
2018-11-16 13:29:28 -08:00
TreeHugger Robot
b6661f3615 Merge "Swaps position of expand button and bell icon." 2018-11-16 17:40:31 +00:00
Felipe Leme
92ab3857b0 Simplified View.onProvideContentCaptureStructure()
That method was returning a boolean to indicate whether the IntelligenceManager
should be notify, so views with virtual hierarchy could return false.

But now it returns void and always notify, which makes the API easier to
understand and use.

Bug: 117944706

Test: m -j update-api doc-comment-check-docs
Test: atest CtsAutoFillServiceTestCases

Change-Id: I216cacb6edb144239b6eabe56ab177fc2582e1aa
2018-11-16 09:19:37 -08:00
TreeHugger Robot
0638d504d0 Merge "Add maxTargetSdk annotation" 2018-11-16 11:38:18 +00:00
Dieter Hsu
02896eb9fe Merge "Synthesize hover events for TouchDelegate#onTouchExplorationHoverEvent" 2018-11-16 09:22:26 +00:00
Rob Carr
235c7199a8 Merge changes from topic "sfinput3"
* changes:
  WindowManager: Communicate with input system by WindowTokens.
  Plumbing for SurfaceControl#setInputWindowInfo.
2018-11-15 23:48:33 +00:00
John Reck
01053cd75b Add maxTargetSdk annotation
Bug: 119066174
Test: build
Change-Id: Ib744d3019bd5969cbfba89d1e350aceef970181f
2018-11-15 14:12:24 -08:00
Gus Prevas
51425313db Swaps position of expand button and bell icon.
This change puts the expand caret at the end of the notification header
if the new interruption model is turned on, and moves the bell icon on
noisy notifications from the end of the header to directly after the
header text.

Test: manually
Change-Id: I2a97f80920598f5f99f2d9c3b14d58858e1de1bb
2018-11-15 15:16:14 -05:00
TreeHugger Robot
18647776ac Merge "Fix ModelFile.isPreferredTo method" 2018-11-15 14:46:36 +00:00
Dieter Hsu
4c83ed859a Synthesize hover events for TouchDelegate#onTouchExplorationHoverEvent
Test: manually test on SwitchBar in settings app
Fix: 119088702
Bug: 119088702
Bug: 35702820

Change-Id: I51b4577b753304b8f97fcf30357f2905d64c2822
2018-11-15 15:08:30 +08:00
Felipe Leme
edc06c8ca2 Merge "Fixed Content Capture workflow when service is disabled." 2018-11-15 06:02:33 +00:00
Felipe Leme
8e2e341b28 Fixed Content Capture workflow when service is disabled.
Bug: 111276913
Test: manual verification

Change-Id: If53eeae88ff6ca6140c90d51ff91436950f05ead
2018-11-14 19:59:28 -08:00
TreeHugger Robot
72c80265eb Merge "Add compat workaround" 2018-11-15 02:35:41 +00:00
Robert Carr
e0a353c6f8 WindowManager: Communicate with input system by WindowTokens.
Once we switch to a model of passing InputWindowInfo through
SurfaceFlinger, the handles will be parcelled and we will
no longer receive the same literal object back from "interceptKeyBeforeQueueing"
or other input callbacks. This means the approach of saddling a WindowState
on to the object for later retreival will no longer work. Instead we pass
the IBinder WindowState#mClient in when registering the input channel, and modify the
input system to pass it back to us as a sort of UUID.

Bug: 80101428
Bug: 113136004
Bug: 111440400
Test: Home button still works.
Change-Id: I0f41e0d08b034aa037518c3a8fb21be1453565da
2018-11-14 17:52:05 -08:00
Robert Carr
788f57484c Plumbing for SurfaceControl#setInputWindowInfo.
The standard SurfaceControl plumbing, plus moving InputWindowInfo from
the services jar to the framework jar so that it is accessible from
SurfaceControl.

Bug: 80101428
Bug: 113136004
Bug: 111440400
Test: None
Change-Id: I3443a98cd04ac6b36977e1874641a34c6befca34
2018-11-14 17:52:04 -08:00
TreeHugger Robot
8b46029dbb Merge "Show IME correctly when top-most display focus changed." 2018-11-15 01:20:45 +00:00
John Reck
5c6397e9bb Add compat workaround
Bug: 119066174
Test: repro from bug
Change-Id: Ifc50fc64422d571ee94ce8510825aed7f915adfd
2018-11-14 15:25:10 -08:00
Felipe Leme
ebebce29f9 Merge "Minor Content Capture-related changes." 2018-11-14 23:10:03 +00:00
Tony Mak
9d20961875 Fix ModelFile.isPreferredTo method
BUG: 119303500

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ModelFileManagerTest.java

Change-Id: Ibbbe7a3bac8ef608f857dc378facf13222a44f2a
2018-11-14 21:09:37 +00:00
Felipe Leme
92736c1af1 Minor Content Capture-related changes.
- Refactored onProvideStructureForAssistOrAutofillOrViewCapture() into a common,
  hidden onProvideStructure(viewFor) method on View that (hopefully :-) makes
  it easier to understand / extend.
- Renamed / documentted some methods on TextView.

Bug: 111276913
Test: atest CtsAutoFillServiceTestCases CtsAssistTestCases \
            AssistFrameworksCoreTests:AssistStructureTest

Change-Id: I328ce3f26a42e7408015cc0014a3f707801ebeb9
2018-11-14 17:27:26 +00:00
Adrian Roos
b849386493 WindowInsets: Fix unintentional un-nulling in legacy constructor
Fixes issues arising from mistakenly turning consumed insets to zero insets
in the legacy Rect constructor.

Change-Id: Ie531fca0fba28eba25843004acfb5444ca6669cd
Fixes: 119310980
Test: atest android.view.WindowInsetsTest
2018-11-14 07:36:25 -08:00
TreeHugger Robot
d8b71cf126 Merge "SF: Add support for boundless layers 2/2" 2018-11-14 02:35:19 +00:00
Felipe Leme
6b3a55c0ba Minor changes on IntelligenceManager APIs.
Test: m -j update-api doc-comment-check-docs
Bug: 117944706

Change-Id: I6fce82e3d9ab7903d0de6c6648a0b2f31a88d956
2018-11-13 17:25:40 -08:00
Vishnu Nair
d454442d86 SF: Add support for boundless layers 2/2
Size is currently used to bound a layer and its child layers. There are
scenarios where we do not want to restrict a layer or its children to any
specific size but have it expand to fill its parent bounds (in the case of a
color layer) or use the size of its buffer. Currently this is achived by providing
a large enough size so that the layer or its children do not get cropped incorrectly.

To fix this, we start by modifying computeBounds and computeScreenBounds
to ignore a layer's size. We calculate the bounds by using the layer's buffer size
and/or crop. In WM, we set the layer's crop property if we want to crop the layer
or child layer to a particular bounds.

Bug: 114413815
Test: go/wm-smoke
Change-Id: I633669876ae434d996532c4d808badabfe3f6787
2018-11-13 13:51:01 -08:00
TreeHugger Robot
639e6dd8a7 Merge "[Magnifier-64] Fix light source alpha for renderer" 2018-11-13 20:45:04 +00:00
John Reck
27600ff5dd Merge "Add force SmartDark dev setting" 2018-11-13 20:33:38 +00:00
TreeHugger Robot
1eec951795 Merge "Added moar ContentCapture APIs (and their initial implementation)." 2018-11-13 19:40:40 +00:00
Mihai Popa
6dcd728607 [Magnifier-64] Fix light source alpha for renderer
I9e6f44b07a170574a905f42338282c4bb7e95f56 changed the way the light
source alphas were set for renderers - the alphas were passed as ints
between 0 and 255 before, while now they are passed as a double between
0 and 1.  This CL updates SimpleRenderer, which is only used by the
magnifier, to use the API correctly. Before this CL, the incorrect usage
was causing the value validation to fail and apps to crash when the
magnifier was trigerred.

Bug: 119423778
Test: manually tested the magnifier
Change-Id: I8978ac16aca38906ec2cf4ae30a83beddfc9e941
2018-11-13 17:29:20 +00:00
Abodunrinwa Toki
97dbb7b968 Merge "Update TextClassifier javadoc." 2018-11-13 16:01:06 +00:00
Wale Ogunwale
99b5308dca Merge "Expose display ID related APIs for use by CTS" 2018-11-13 15:04:59 +00:00
TreeHugger Robot
1b34837e69 Merge "Add get/setExtras to TextLinks and TextSelection" 2018-11-13 12:09:42 +00:00
Tony Mak
916bb9e37e Add get/setExtras to TextLinks and TextSelection
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextSelectionTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextLinksTest.java
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/TextClassifierValueObjectsTest.java

BUG: 118690735

Change-Id: I5786db40b24b38020514f96b1d642835c9a9db51
2018-11-13 12:09:22 +00:00