Commit Graph

11760 Commits

Author SHA1 Message Date
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
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
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
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
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
lumark
6f13d20b8e Show IME correctly when top-most display focus changed.
In previous design, the IME focus is changed when receiving
window focus change from ViewRootImpl.

For Multi-Display concept, it should be needed to aware the top
display focus changed in different displays but both are already
had the focused window without change case.

Sending REPORT_FOCUS_CHANGE when top display focus changed for
ViewRootImpl, let IMM can re-focus IME window on right display.

Bug: 117491872
Test: atest ActivityManagerMultiDisplayTests
Test: atest FrameworksServicesTests:DisplayContentTests

Change-Id: Ia46738a5da6dbc334bf937b0f6656a57523c28a7
2018-11-13 17:26:55 +08: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