Commit Graph

11746 Commits

Author SHA1 Message Date
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
TreeHugger Robot
9005dafb74 Merge "Implements TextClassifierImpl.suggestConversationActions" 2018-11-13 11:14:08 +00:00
Tony Mak
adbebcc634 Implements TextClassifierImpl.suggestConversationActions
TODO: Construct RemoteAction for contextual actions.
TODO: Map Person object to user id.
TODO: Consider to use LangID to infer the locale. And get a new model when locale is changed.

BUG: 111437455
BUG: 111406942

Test: atest ./core/tests/coretests/src/android/view/textclassifier/TextClassificationManagerTest.java

Change-Id: Id35066455918b3321fcd30df0ff215e30586a4b3
2018-11-13 11:12:40 +00:00
Felipe Leme
88eae3bc69 Added moar ContentCapture APIs (and their initial implementation).
There are 4 new APIs on View:
  - boolean setImportantForContentCapture()
  - boolean getImportantForContentCapture()
  - boolean isImportantForContentCapture()
  - boolean onProvideContentCaptureStructure()

And 4 on IntelligenceManager:
  - void notifyViewAppeared()
  - void notifyViewDisappeared()
  - void notifyViewTextChanged()
  - ViewStructure newVirtualViewStructure()

These methods are similar to the equivalent methods that are used for Autofill
and/or Assist, except for the following differences:

- The view hierarchy nodes are reported as they are rendered, rather than at
  once in a tree, recursively. Hence, the ViewStructure implementation does
  not implement the methods that add children to it, and views that provide
  virtual hierarchies must manually call IntelligenceManager to create the
  ViewStructure to their children and notify when their children are added and
  removed.
- It does not support methods added for Autofill to handle HTML pages (such
  as setHtmlInfo() and setWewbDomain()), as they're not important in the
  Content Capture context.
- Similarly, it also does not support setDataIsSensitive(), because the
  Intelligence service does not have the same restrictions as the Autofill
  service.

The CL also provides the initial implementation of these APIs, although still
full of TODOs (for example, we're not holding the events to send as a batch
yet).

Test: m -j update-api doc-comment-check-docs
Bug: 117944706

Change-Id: I43f06ce82bfe3b14d8d13fb3b2ebee223db83284
2018-11-12 22:29:26 -08:00
Tiger Huang
fc2184596e Expose display ID related APIs for use by CTS
For CtsWindowManagerDeviceTestCases:WindowFocusTests

Bug: 111361570
Test: atest WindowFocusTests android.view.cts.KeyEventTest
Change-Id: I273120f71f42d2eaa52786b4a350f3c099d11989
2018-11-13 13:38:23 +08:00
Daichi Hirono
320a0124e8 Merge "Update API doc of View.DragShadowBuilder" am: 29f0f9a910 am: 0539710f6f
am: 1fa1b991f0

Change-Id: I647a5644db8dbcee6ceff59eba798e7b0e1d4f52
2018-11-12 19:57:43 -08:00
Daichi Hirono
1fa1b991f0 Merge "Update API doc of View.DragShadowBuilder" am: 29f0f9a910
am: 0539710f6f

Change-Id: I211e1b255fbdc4a49533409d7879f953780800a8
2018-11-12 19:47:19 -08:00
Treehugger Robot
29f0f9a910 Merge "Update API doc of View.DragShadowBuilder" 2018-11-13 03:15:51 +00:00
TreeHugger Robot
581cccdde9 Merge "Implement launch bounds logic in Android (3/3)" 2018-11-12 22:01:31 +00:00
TreeHugger Robot
a79fac052f Merge "Add ACTION_PAGE_UP/DOWN/NEXT/PREVIOUS" 2018-11-12 21:52:20 +00:00
Qasid Ahmad Sadiq
9570561a4f Add ACTION_PAGE_UP/DOWN/NEXT/PREVIOUS
This not only indicates if something is paged, it also indicates what
direction a page can be scrolled towards.

Test: The API Builds, there is no executable code here, that is for
another CL
Bug: 119425427

Change-Id: I0a40079f4e31e48bc53445a247e301c0d09d2497
2018-11-12 21:52:09 +00:00
Oleg Kibirev
7502c41e8a Merge "Add key code for thumbs up, thumbs down and profile switch keys" 2018-11-12 20:57:31 +00:00
Garfield Tan
891146c6a6 Implement launch bounds logic in Android (3/3)
This CL introduces persistence to launch bounds logic. It also wires up
the following state changes and persister:
1) freeform resizing;
2) windowing mode change;
3) display change;
4) task closing.

We may still need to persist immersive mode, but that needs further
discussion.

Changed launch bounds modifier a bit so that it won't launch tasks that
are completely out of the new display or conflict to existing tasks.

Bug: 113252871
Test: Manual tests on that freeform launch bounds are persisted across
reboots.
atest WmTests:LaunchParamsPersisterTests
atest WmTests:LaunchParamsControllerTests
atest WmTests:PersisterQueueTests
Change-Id: I20f3056735253c668c7f09c6eb5204e6a5990b1c
2018-11-12 09:11:35 -08:00
John Reck
de20c578ef Add force SmartDark dev setting
Bug: 118348733
Test: toggled it
Change-Id: I3fce6d399af79102c1c8bd583f8da27d5eadbeaa
2018-11-12 08:47:41 -08:00
Chilun
8753ad366b Implement new API of external display settings (1/2)
- Using DisplaySettings class for storing the display settings.
- Define flags in WindowManager.
- Have direct IWindowManager APIs to set and change display settings at
  runtime.
- Mark TODO to original usage of the flags.
- Add test case of DisplaySettings.
- Expose some APIs for CTS usage.

Bug: 114338689
Test: atest DisplayWindowSettingsTests
Test: atest CtsApacheHttpLegacy27ApiSignatureTestCases
Change-Id: I64ed14866d45cd5817fc3c895b6110c79c37b0ad
2018-11-10 16:49:56 +08:00
John Reck
6ae76d0d8a Merge "Refactors and a potential public API for rendering" 2018-11-09 19:16:27 +00:00
Gus Prevas
a32264906d Adds an icon to noisy notifications.
Test: manually
Bug: 116622974
Change-Id: I657e81eed9c650f1613caffaea96e6445c2105ef
2018-11-09 10:35:27 -05:00
Abodunrinwa Toki
aa750a40d4 Update TextClassifier javadoc.
Test: none.
Change-Id: I63c73b9a453bfde0f056b8cacaef117b2be0f440
2018-11-09 15:00:51 +00:00
Rhed Jao
33ded61ceb A11y timeout api: build breaks fixed
Test: build pass
Change-Id: I30cb7aa6e219508dc9ca90e0480ff77ff49caf19
2018-11-09 19:49:21 +08:00
Rhed Jao
41118f33b1 Update a11y recommended timeout api.
Update api name to getRecommendedTimeoutMillis.
Api returns timeout for interactive or non-interactive controls.
Also provide the options for a11y service to specify two kinds of
timeout.

Bug: 111210981
Test: atest SettingsBackupTest
Test: atest AccessibilityManagerTest
Test: atest AccessibilityServiceInfoTest
Change-Id: I37d35796fd72bb4d6628a6bb33b111987f321552
2018-11-09 10:24:07 +08:00
John Reck
8785ceb3b9 Refactors and a potential public API for rendering
Split out the View/ViewRootImpl bits from the
hardware rendering bits.

Create a potential public API surface for
hardware rendering

Bug: 112709971
Test: builds & boots

Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
2018-11-08 15:32:35 -08:00
Oleg Kibirev
cdd17b52a2 Add key code for thumbs up, thumbs down and profile switch keys
Bug: 119202163
Test: Trivial addition of new constants
Change-Id: I5743b4b818a837c88efaca311908bb5e8ec206ca
2018-11-08 14:08:14 -08:00
TreeHugger Robot
eeca4f5a30 Merge "Add Inspector annotations" 2018-11-08 21:35:20 +00:00
TreeHugger Robot
116b1a2ac5 Merge "Documentation for KeyEvent.getRepeatCount()" 2018-11-08 02:29:22 +00:00
Evan Rosky
38e1cb73f5 Merge changes from topic "wm_move_disp_to_hier_2"
* changes:
  Move some display logic into hierarchy [2/2]
  Move some display logic into hierarchy [1/2]
2018-11-08 01:15:27 +00:00
Siarhei Vishniakou
4fddffcc33 Documentation for KeyEvent.getRepeatCount()
The existing documentation suggests that ACTION_UP events will contain a
valid repeat count that is equal to the repeat count of the latest
ACTION_DOWN event. However, in practice, that is not the case.

Rather than changing the behaviour to follow the existing documentation,
change documentation to conform to the existing behaviour. The rationale
here is that changing the behaviour might mean that some apps would
start relying on getRepeatCount() being non-zero. But this would only
work on the latest Android release. So if an app is tested only on the
latest Android release, and not on the release before this behaviour was
changed, the app would be broken on the older releases of Android.

Test: CTS tests will be added for injection
Bug: 113341746
Change-Id: Ia53e0e606c0b3c64135ef00950dc8a19f62933ca
2018-11-07 17:02:29 -08:00
Ashley Rose
041d90b23e Add Inspector annotations
Add the @InspectableChildren, @InspectableNodeName, and
@InspectableProperty annotations, and a host library containing them for
use in the annotation processor.

Bug: 118893821
Test: m
Change-Id: I11dcec09c2c69db951fc87d37463b6f8ca28d8fe
2018-11-07 17:38:51 -05:00
Ashley Rose
fe878c454a Merge "Add InspectionHelper and related interfaces" 2018-11-07 20:54:53 +00:00
Ashley Rose
0f25a25f40 Add InspectionHelper and related interfaces
Create a new package, android.view.inspector, which contains the
InspectionHelper interface, and the associated interfaces
ChildTraverser, PropertyMapper, and PropertyReader.

Test: m
Bug: 118895011
Change-Id: Iaedf1c82ac302bbc467300065b8e1612baf57ad7
2018-11-07 18:35:36 +00:00
Adrian Roos
18b11d5c3a WindowInsets: Workaround for javadoc issue
There seems to be an issue with referencing constructors for
inner classes, working around this until it is investigated.

Bug: 119190588
Test: make droid
Change-Id: I41f98fbe0f066358f3a8bf73052065c7feb7234a
2018-11-07 19:04:21 +01:00
Jorim Jaggi
05ac00c630 Merge changes from topic "windowinsets-api"
* changes:
  WindowInsets: Annotate nullability
  WindowInsets: Add Builder
  WindowInsets: reimplement WindowInsets on top of Insets
  WindowInsets: make WindowInsets.inset() public
2018-11-07 16:35:06 +00:00
Evan Rosky
e747c3e4e1 Move some display logic into hierarchy [2/2]
Move display update logic from WM into ATM hierarchy by letting
ActivityStack watch for relevant changes and calculate bounds
accordingly and removing configuration updates from WM side
outside of calls from the display-level controller (like how
the other levels work).

One of the main display-changes to account for is rotation. To
make this work without drastically modifying things was to leave
display freeze/startSeamless in WM but move the actual rotation
to ATM while handling SEND_NEW_CONFIGURATION. This prevents
changes to the wm-side hierarchy outside of ATMS's control.

To facilitate this extra communication between ATMS and WM,
this adds rotation into WindowConfiguration. This makes rotation
available to the hierarchy update for policies that care about it
(things like split). It will also replace TaskStack's mRotation
in an upcoming CL and should also let us remove the one-off
variable for landscape->seascape orientation changes (needs
some more research though).

Bug: 113900640
Test: go/wm-smoke + relevant am/wm servicestests
Change-Id: I12c79cc5eb94d48d846f1cf27765c9f9f6741435
2018-11-06 18:39:37 -08:00
Felipe Leme
a7bdb1486e Refactored InteractionSessionId.
Rather than use a local and global id, just use a local, unique id.

Such change not only simplifies the code, but makes it consistent with
TextClassificationSessionId.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: I0e610f825aab1d2b32bbafa1bd3d3c7897d889d6
2018-11-06 13:09:03 -08:00
Felipe Leme
7a53408d19 Initial implementation of IntelligenceService.onContentCaptureEvents()
It's only implementing the activity lifecycle events, but at least they're fed
end-to-end in the pipeline (from app to service implementation).

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: I2f46be1e6a6a21ad909e5fffea01bedaa28fb300
2018-11-06 13:02:48 -08:00
Felipe Leme
e348dc3486 Initial implementation of the IntelligenceService pipeline.
It's still full of TODOs, but at leats it now provides an end-to-end
workflow from the activity creation / destruction to the service implementation.

Test: mmm -j packages/experimental/FillService && \
      adb install -r ${OUT}/data/app/FillService/FillService.apk && \
      adb shell settings put secure intel_service foo.bar.fill/.AiaiService
Bug: 111276913

Change-Id: Id5daf7b8b51e97c74d9b6ec00f953ddb02b48e46
2018-11-06 10:01:02 -08:00
Felipe Leme
f783fa0781 Fixed javadoc...
IntelligenceService is a @SystemApi, and hence not available from non-system.

Test: echo "in TH we trust"
Bug: 111276913

Change-Id: I4c28de49334bdf100a26963e47df9630804730df
2018-11-05 14:58:18 -08:00
Felipe Leme
05083b019f Merge "Initial APIs for Intelligence Service." 2018-11-05 21:48:54 +00:00
John Reck
f2c351abb4 Merge "Make RenderNode public API" 2018-11-05 20:54:57 +00:00
Felipe Leme
1dfa9a0195 Initial APIs for Intelligence Service.
A.K.A: "The thing's hollow — it goes on forever — and — oh my God! —
        it's full of TODOs!"

Bug: 117944706
Test: m update-api && m

Change-Id: I0774a0df4f4ea0810a8c5f72a1fbcd4eef5cd09b
2018-11-05 09:22:18 -08:00
Dieter Hsu
3ee2bd7d21 Merge "Improve TouchDelegate Accessibility: Explore by Touch handle hover events" 2018-11-03 22:30:13 +00:00
John Reck
ddeaa487da Make RenderNode public API
Bug: 112709971
Test: CtsUiRenderingTestCases:.testclasses.RenderNodeTests
Change-Id: I57d64165b842d03565eda5f4d37343c4f9c45d42
2018-11-02 14:24:32 -07:00
TreeHugger Robot
1b2a677360 Merge "Refactor model listing / selection code to support other types of model" 2018-11-02 16:08:41 +00:00
Tony Mak
ba22842144 Refactor model listing / selection code to support other types of model
Currently, listModelFiles and findBestModelFile methods only support annotator model.
But we want to extend them to support other models as well, like langID and actions.

Thus, introducing ModelFileManager, which provides listModelFiles and
findBestModelFile. ModelFileManager takes a Supplier<List<ModelFile>> to list model files.
For different types of model, we just need to provide a different supplier to the ModelFileManager.

There should be no behavior change.

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

Change-Id: I4fc3fd1c9246383ee5d906792bb14b96dbf0a79f
2018-11-02 11:19:44 +00:00