Commit Graph

12786 Commits

Author SHA1 Message Date
TreeHugger Robot
0819556982 Merge changes from topic "check display id update" into qt-dev
* changes:
  Unify context in ViewRoot
  Add test API getDisplayId for cts test
2019-05-03 16:11:01 +00:00
TreeHugger Robot
0c8199dc59 Merge "Add an @hide way to adjust CursorAnchorInfo for another Matrix" into qt-dev 2019-05-03 15:56:32 +00:00
TreeHugger Robot
b5112587de Merge "Inject session id on all AutofillIds kept in the service." into qt-dev 2019-05-03 02:17:37 +00:00
TreeHugger Robot
0459aaab3b Merge "ContentCaptureManager is notified when FLAG_SECURE is set dynamically on windows." into qt-dev 2019-05-03 01:33:38 +00:00
TreeHugger Robot
a88da2b7c7 Merge "Revert change to force_dark property" into qt-dev 2019-05-03 00:21:38 +00:00
Adam He
43c0699042 ContentCaptureManager is notified when FLAG_SECURE is set dynamically on
windows.

Fixes: 130377514
Test: # manual verification
Change-Id: I18126de8284a0c95ff61107031ffff941ca26be7
2019-05-02 16:22:50 -07:00
TreeHugger Robot
77f574dfe9 Merge "New @TestApi: AutofillId.equalsIgnoreSession" into qt-dev 2019-05-02 22:49:24 +00:00
TreeHugger Robot
f1c4f30c54 Merge "Adjust SurfaceView visibility on parent change" into qt-dev 2019-05-02 21:11:43 +00:00
John Reck
0b5db0ee72 Revert change to force_dark property
Settings can't write to persist.* without special
selinux rules. Instead for debug simplicity just
switch back to debug.hwui.force_dark and let it
reset on reboot.

Fixes: 131697927
Test: toggle override-force dark in dev options
Change-Id: Ieac6edb2a7b444fc2f63d5d4f1b657bad6ead409
2019-05-02 12:59:40 -07:00
TreeHugger Robot
9829cf5451 Merge "Lazy-load textclassifier settings." into qt-dev 2019-05-02 16:44:15 +00:00
Yohei Yukawa
e4410a135b Add an @hide way to adjust CursorAnchorInfo for another Matrix
This is a preparation to support CursorAnchorInfo API in ActivityView.

In order to enable the system to automatically adjust CursorAnchorInfo
object between the IME client and IME, there needs to be an @hide
method to create a new CursorAnchorInfo instance with applying an
additional coordinate transformation Matrix, which is what this CL
does.

This CL also cleans up CursorAnchorInfoTest.java as most of test there
were already moved to CTS [1].

Anyway, this is a mechanical change.  There should be no behavior
change in existing methods in CursorAnchorInfo.

 [1]: Ib758bddff34b4722b39c94e7ad4e8f8da2bb8b92
      c4ef1d6ec22dc2af2ed339fd4e78075903783be0

Bug: 115693908
Test: atest CtsInputMethodTestCases:CursorAnchorInfoTest
Test: atest FrameworksCoreTests:CursorAnchorInfoTest
Change-Id: Ic7f9057623ffc61ec7a6121735dc39adecf4649d
2019-05-02 06:52:02 -07:00
Abodunrinwa Toki
0634af3875 Lazy-load textclassifier settings.
Re-enables reading settings from device_config.
See: I6b7ab56e4015448ee068deb49e7f6fa133fea53c
Updates tests.
Updates documentation.

Bug: 129934185
Test: atest android.view.textclassifier
Test: (Performance) Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
      Compare performance results with ConfigParser.ENABLE_DEVICE_CONFIG
      set to true vs false. Trivial regression recorded i.e. 1.03x.
Test: (Manual) Change flags and see them reflected. e.g.
      adb shell cmd device_config put textclassifier system_textclassifier_enabled false
      Verify that app no longer uses the OEM TCS but the AOSP TC.
Change-Id: I4c6ff781c97fc2e3d3da55dc49123fa1d759670a
2019-05-02 12:55:58 +01:00
Tiger Huang
d8ec938609 Refine getTransformationMatrix for windows in a re-parented display
Currently, the translation of the transformation matrix computed by
WindowState.getTransformationMatrix is related to its own display.
However, if the display has been re-parented, the translation might
be misplaced to the visual result. This CL makes it return the global
transformation matrix.

Bug: 129098348
Test: atest WindowStateTests
Change-Id: I38da5b84a11890bf0f4a57eb9d5b7e71bdcc16a9
2019-05-02 12:53:55 +08:00
Felipe Leme
785777bb05 Inject session id on all AutofillIds kept in the service.
Android Q introduce the FLAG_DELAY_SAVE, which allows the autofill service to delay the SAVE UI by
keeping the session open. But this approach introduces a new problem, as fields from different
activities could have the same AutofillId.

Test: atest MultiScreenLoginTest#testSaveBothFieldsCustomDescription_sameIds
Test: atest AutofillIdTest
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 113593220

Change-Id: Ibd187f5c58c150f820972fcab6d88217294ffe2d
2019-05-01 18:10:00 -07:00
TreeHugger Robot
1d40ffcabf Merge "Fix NPE in findFrameMetricsObserver" into qt-dev 2019-05-02 00:59:30 +00:00
Felipe Leme
7b307ea7b2 New @TestApi: AutofillId.equalsIgnoreSession
Test: atest FrameworksCoreTests:android.view.autofill.AutofillIdTest
Bug: 113593220

Change-Id: I72c5727638558d3b8dc0c57045a8e43c1d506069
2019-05-01 17:04:37 -07:00
TreeHugger Robot
9f590ef1a9 Merge "Propogate disabled state to content capture session after changing user restrictions or on ccm.setContentCaptureEnabled()." into qt-dev 2019-05-01 23:50:58 +00:00
John Reck
d0abd668b3 Adjust SurfaceView visibility on parent change
Bug: 131239825
Test: manual testing in youtube, SurfaceViewSyncTests still pass

Change-Id: Ib1262f22b4be65ea2776ebfe930d7181b487bc99
2019-05-01 14:30:51 -07:00
Matt Pape
8e24abad64 Merge "Migrate usage of single property lister to multi prop listener." into qt-dev 2019-05-01 17:20:12 +00:00
Matt Pape
15769e2ffa Migrate usage of single property lister to multi prop listener.
Test: atest CtsViewTestCases:TextClassificationManagerTest
      atest FrameworksCoreTests:TextClassificationManagerTest
      atest ExtServicesUnitTests:AssistantSettingsTest
      atest SystemUITests:SmartReplyConstantsTest
      atest FrameworksServicesTests:AutofillManagerServiceTest
      atest FrameworksUiServicesTests:NotificationManagerServiceTest
Bug: 128902955
Change-Id: I00e524b615b3bd03b6b40535410ff7eb2ef6f8ee
2019-04-30 16:35:16 +00:00
lumark
9a72d2285c Don't allow showing IME on untrusted virtual displays
Sometimes users can have sensitive information in IME window, such as
predictions or custom background.

If app could create a virtual display with system decorations support,
the security leak may happen that app can read the text or image from
the surface.

Add a check if the display is trusted that owned by system
When showSoftInput requested, if the display is not trusted then
show IME on default display.

Note that we also modified ImeDisplayValidator to use dedicated API
IWindowManager#shouldShowIme for checking if IME support on a display.
(And add it as @TestApi for CTS to verify)

Fix: 129443632
Fix: 129881992
Test: atest MultiDisplaySystemDecorationTests

Change-Id: Icfd66689dad4b782c50b56a515194dd138d3b280
2019-04-30 16:43:09 +08:00
John Reck
140ff5ea8e Fix NPE in findFrameMetricsObserver
Fixes: 120536278
Test: none
Change-Id: Ie32b10c5ab7e94367f8a21892dfe6d2be4d81d19
2019-04-29 13:13:01 -07:00
Charles Chen
5299ad093c Unify context in ViewRoot
To fix the issue that mContext is not updated when moved to another
display, we previously introduce mDisplayContext as a workaround in [1].
Change to use Context#updateDisplay(int) to unify mDisplayContext to
mContext.

[1]: Ifa0ca24e9cf764caf492ee065606680b6a06751a

Bug: 116349163
Change-Id: I3adbb32a584ac3405563904c1fd077e96e0807c1
Test: atest ActivityManagerMultiDisplayTests
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest InputMethodManagerTest
Test: atest InsetsControllerTest
Test: atest InsetsSourceConsumerTest
Test: atest ImeInsetsSourceConsumerTest
Test: atest CtsActivityManagerDeviceTestCases:MultiDisplayClientTests
2019-04-29 12:00:57 +08:00
Charles Chen
414820ecc2 Add test API getDisplayId for cts test
Bug: 130379901
Bug: 116349163
Test: atest MultiDisplayClientTests
Change-Id: I6f26c3b5a3abcd82945298e62015ea1259aea954
2019-04-29 11:57:39 +08:00
TreeHugger Robot
7f13e479bc Merge "Always instantiate DisplayAddress.Physical" into qt-dev 2019-04-27 00:01:01 +00:00
Adam He
6c0afca46a Propogate disabled state to content capture session after changing user
restrictions or on ccm.setContentCaptureEnabled().

Bug: 124127364
Test: # manual verification
Change-Id: Ic9688f33f8b9153ab967e5842f939a18fe85412e
2019-04-26 15:22:00 -07:00
John Reck
8538ceba82 Merge "Fix some force_dark prop behaviors" into qt-dev 2019-04-25 23:37:05 +00:00
John Reck
8915167a88 Fix some force_dark prop behaviors
* Make it persist.hwui.force_dark so the dev option
  survices reboots.

* Remove the internal super-override behavior it applied
  using only the intended ViewRootImpl theme-aware behavior.

Fixes: 127350499
Fixes: 130354206
Test: set dev option, verified nothing went dark. Set dark
theme, verified non-dark apps were force-darked. Rebooted
and verified property still set.

Change-Id: I43adcbc25320669510fb03b162c98cbd14612f55
2019-04-25 10:59:23 -07:00
Dominik Laskowski
0de02a8df4 Always instantiate DisplayAddress.Physical
In legacy multi-display mode with at most two physical displays,
physical display IDs reduce to the port IDs for the internal and
external connections.

This CL instantiates a DisplayAddress.Physical whose getModel method
returns null, such that port-dependent logic (e.g. display settings
and input association) works on legacy systems without EDID support.

Bug: 130672828
Test: dumpsys display
Change-Id: I12a40078c5e3666e59283623ec600e8d76493359
2019-04-25 10:19:40 -07:00
Chavi Weingarten
6ce572ec6c Merge "Added direct call to syncInputTransactions" into qt-dev 2019-04-25 16:27:37 +00:00
chaviw
84dec9f7c6 Added direct call to syncInputTransactions
Previously, there was only a way to inject input after syncing inputs.
However, some tests require a direct call to sync inputs since we need
to ensure the info was propagated to InputManager native before
continuing with the test. This exposes a method just to
syncInputTransactions.

Bug: 130695122
Test: ActivityLifecycleTopResumedStateTests
Test: MultiDisplayPolicyTests
Change-Id: Ie3115741a20d04c743fd854ac421dc3705332488
2019-04-24 17:01:31 -07:00
Tarandeep Singh
c63ff2d590 Merge "Register Ime consumer only when insets are enabled." into qt-dev 2019-04-24 19:34:20 +00:00
Tarandeep Singh
7928f7cd4d Register Ime consumer only when insets are enabled.
As of today we register Ime consumer in IMM onWindowGainedFocus().
However, it does nothing functionally when ViewRootImpl#sNewInsetsMode is disabled.
This CL adds a check to not register consumer at the first place.

This may also be causing a leak. Added a TODO to revisit that before we
enable the flag.

Bug: 131181940
Test: atest ViewRootImpl
Test: atest InsetsController
Change-Id: I6b2b62d10670d63edafeb1b24c25b26c7721f3ad
2019-04-24 06:29:35 +00:00
Jackal Guo
efc894eeec Merge "Race condition while injecting ACTION_OUTSIDE" into qt-dev 2019-04-24 05:47:11 +00:00
Jackal Guo
8bcc0a9846 Race condition while injecting ACTION_OUTSIDE
In order to dismiss dialog in accessibility, we would also send
ACTION_OUTSIDE while performing ACTION_CLICK. However, the result
of performing ACTION_CLICK in AccessibilityInteractionClient may
be overwritten by the result of performing ACTION_OUTSIDE. This
causes that TouchExplorer may get incorrect result and follow-up
behavior is different.

Bug: 127902192
Test: a11y CTS & unit tests
Test: After enabling Talkback, manually test on 'View Terms' page
      in ManagedProvisioning to check if the section heading can
      be expanded/collapsed by double tap.

Change-Id: Id6b1f63ea87418c66bf1aebdea829f656581e8ed
2019-04-23 03:29:47 +00:00
Sara Kato
9498153dfd Merge "Add @Nullable annotation to getAccessibilityWindowId" into qt-dev 2019-04-23 01:28:23 +00:00
TreeHugger Robot
845d5ee587 Merge "Fixed content capture whitelist for specific activities." into qt-dev 2019-04-22 22:34:09 +00:00
TreeHugger Robot
4354101749 Merge "Move locale from LanguageDetectionEvent to base class" into qt-dev 2019-04-21 09:02:26 +00:00
Felipe Leme
cbf7f26baa Fixed content capture whitelist for specific activities.
Test: manual verification (it cannot be fully verified using the current CTS setup)
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.WhitelistTest
Test: atest FrameworksCoreTests:android.content.ContentCaptureOptionsTest
Test: atest CtsContentCaptureServiceTestCases # sanity check
Test: m update-api

Fixes: 130573023
Merged-In: I2c76a01bd98c4154c4c59099f1368232d2dba80d
Change-Id: I2c76a01bd98c4154c4c59099f1368232d2dba80d
2019-04-19 20:25:45 -07:00
Felipe Leme
8c2360b123 DO NOT MERGE - Updated some javadocs.
Test: make ds-docs

Bug: 130726495
Fixes: 130737893

Change-Id: Idaf50cb17b0668f3052d86f256d5428ba4e06a3c
2019-04-19 16:08:48 -07:00
Sara Kato
0fdbae3c46 Add @Nullable annotation to getAccessibilityWindowId
Bug: 126701062
Test: None
Change-Id: I7d13d56f5ffb303431f7e82418134d6f17275ef5
2019-04-19 12:04:51 +00:00
Daichi Hirono
3e9d510586 Add a flag to cancelDragAndDrop to skip animation
When running cancel animation for drag shadow image, the system cannot
start another drag operation, which is problematic when the system would
start the other drag operation quickly.

Bug: 130313958
Test: Cancel drag operation by calling cancelDragAndDrop
Change-Id: I5d6650a0ce9a4cd80bbdb1beabc9e514349ccadc
2019-04-19 02:30:06 +00:00
Nader Jawad
5c5ffcbd7a Merge "Added BlendMode equivalent APIs to replace deprecated PorterDuff variants" into qt-dev 2019-04-18 21:18:32 +00:00
Tony Mak
c30a91702d Move locale from LanguageDetectionEvent to base class
A follow up change of ag/7058048.

Also fixed a wrong nullability annotation, ConversationActions.getHints
should be @NonNull.

Bug: 129344540
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/

Change-Id: Iae734b4b27dd3dd8294684330bec198072693a57
2019-04-18 10:25:25 +01:00
Nader Jawad
531db61ac1 Added BlendMode equivalent APIs to replace deprecated PorterDuff
variants

Updated various framework Views to have equivalent BlendMode APIs
to replace the deprecated PorterDuff equivalents.
Updated InspectableProperty annotations to refer to the same
xml attributes as the original tintmode APIs

Bug: 126726419
Test: Added CTS tests to verify new BlendMode APIs
Change-Id: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
Merged-In: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
2019-04-17 21:11:39 +00:00
Adrian Roos
8c7ca4f5c2 Ensure Contrast: Address API feedback
Fixes: 130647853
Test: make checkapi
Test: atest EnsureBarContrastTest NavigationBarColorTest
Change-Id: Iafbdce8476134df56ea5d15155391b10afc9ce94
2019-04-17 21:36:04 +02:00
Charles Chen
5a2e6040c2 Merge "Revert "Unify context in ViewRoot"" into qt-dev 2019-04-17 13:45:23 +00:00
Charles Chen
fd85036cc7 Revert "Unify context in ViewRoot"
This reverts commit 44f5215ee8.

Reason for revert: <Make Ime test in SystemDecorationTest failed>
Bug: 130715649

Change-Id: I9afb1d5ee7e7a4f1e7de6fa4c7c3ec5dcc336f08
2019-04-17 13:39:06 +00:00
TreeHugger Robot
c1a0fbcec5 Merge "Unregister ImeInsetsSourceConsumer when focus lost" into qt-dev 2019-04-17 13:03:28 +00:00
TreeHugger Robot
59ed9a7f27 Merge "Follow-up CL of ag/6935284, add entities to extras in generateLinks" into qt-dev 2019-04-17 10:11:18 +00:00