Commit Graph

14652 Commits

Author SHA1 Message Date
Yuncheol Heo
cac5bb32ec Merge changes from topic "immersive" into rvc-dev am: 8f4363a226 am: 8752446dab am: 7ac3c1b8b6 am: 1092daf3a5
Change-Id: I541272cb1a0f4aac2990a59133025e4af78c7029
2020-05-05 01:10:29 +00:00
Yuncheol Heo
8f4363a226 Merge changes from topic "immersive" into rvc-dev
* changes:
  Add test api getStatus/NavigationBarBackgroundView.
  Notify the visibility change to update color views without control.
2020-05-05 00:14:09 +00:00
Yuncheol Heo
70c4bb9007 Add test api getStatus/NavigationBarBackgroundView.
Introduces new test api to access the background view of status bar and
navigation bar.

Bug: 154720832
Test: atest WindowInsetsPolicyTest

Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
2020-05-04 14:36:43 -07:00
Yuncheol Heo
02d3a8ad07 Notify the visibility change to update color views without control.
Previously, we've notified it only when we have the control.
But to update color views, we should notify it even when we have no control.

Bug: 154720832
Test: atest WindowInsetsPolicyTest
Test: make sure no regression on b/150195782, b/151425506
Change-Id: I44b88ddc206f36d8ef11dae9c1477739a185ff21
2020-05-04 14:36:28 -07:00
Jorim Jaggi
02fab899d6 Merge "Restore force relayout logic for apps targeting < R" into rvc-dev am: 98f012c304 am: 5706a132ab am: 0c321614b2 am: cd794c76f6
Change-Id: I0d10f160fd08a29b3d729b91b437ea818a817a21
2020-05-04 21:18:20 +00:00
Feng Cao
c357f974e4 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev am: 98367aef11 am: 3767c8db8c am: 1eedaf79f3 am: 415c282d00 am: 832dd66790
Change-Id: I2233cbf918988c5bdc54278c67a05c19d97f2f0e
2020-05-04 20:51:39 +00:00
TreeHugger Robot
3cebf8e0c5 Merge "SurfaceControlViewHost: Let ViewRoot release control." into rvc-dev am: 1e15db9ce4 am: ca6c0c8075 am: 9e0b864391 am: 92113a466f am: 4f790a2865
Change-Id: I05da75d55070ce6f6d6137a7aa5ae8d0ddae4153
2020-05-04 20:50:59 +00:00
Automerger Merge Worker
30319ca9f1 Merge "Merge "Fix IME visibility after lock screen" into rvc-dev am: fcaa5a8667 am: 36f7ed1238" into rvc-d1-dev-plus-aosp am: 6031d0c438 am: c80dc5c2ff
Change-Id: I88596c7b0202dd4dfdfddd5828f90d9ed1ae7a36
2020-05-04 20:47:19 +00:00
Jorim Jaggi
98f012c304 Merge "Restore force relayout logic for apps targeting < R" into rvc-dev 2020-05-04 20:44:08 +00:00
Feng Cao
98367aef11 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev 2020-05-04 20:30:01 +00:00
TreeHugger Robot
1e15db9ce4 Merge "SurfaceControlViewHost: Let ViewRoot release control." into rvc-dev 2020-05-04 20:19:04 +00:00
TreeHugger Robot
fcaa5a8667 Merge "Fix IME visibility after lock screen" into rvc-dev 2020-05-04 20:00:53 +00:00
Feng Cao
08abd46f61 Make autofill requested by augmented autofill service non-manual
* The use case of this API was for augmented autofill service to send
  updated suggestions
* Before this change, the dynamic autofill request by the augmented
  autofill service only triggers a manual request, but this has caused
  some regular autofill providers to always some suggestion due to
  their special handling for the manual request. Thus the augmented
  autofill service will not receive the request.
* With this cahnge, the request cancels the previous session to start a
  new session, and also it triggers a regular request (non-manual) so
  the autofill provider will not special handle the request.

Test: atest CtsAutoFillServiceTestCases
Bug: 154543563

Change-Id: I233125a6070394a102ad40b9a50b98a43d952b9f
2020-05-04 11:36:21 -07:00
Robert Carr
8644050a99 SurfaceControlViewHost: Let ViewRoot release control.
In SurfaceControlViewHost#release we currently immediately
release mSurfaceControl and then call ViewRootImpl#doDie.
However doDie executes on a handler so the ViewRootImpl may try
and use the SurfaceControl between posting and executing
the message. Actually this release is totally erroneous,
mSurfaceControl is the same object used by the ViewRootImpl
and the ViewRootImpl will release it when processing
doDie().

Bug: 155575445
Test: Existing tests pass
Change-Id: I6a4bf41ba38636ff884aa73d2653b1bab6958b00
2020-05-04 11:23:29 -07:00
Leon Scroggins
fdc7ce1e72 Merge "Move Canvas compatibility settings into Compatibility class" 2020-05-04 18:01:42 +00:00
Leon Scroggins III
9a49427384 Move Canvas compatibility settings into Compatibility class
Bug: 155422223
Test: make

Follow on to Ie7172fb93364a1e04ab844b8fa64887bf9d8b005. Remove @hidden
APIs on Canvas - instead call setCompatibilityVersion from the
Compatibility class already in the Java package. This is a step towards
moving Canvas into a mainline module. Note that this means these are set
when the application is bound, rather than when the first View is
created.

Change-Id: I3f73d77ba7351a6cb653dd550210698c6482e1bb
2020-05-04 18:00:25 +00:00
Jorim Jaggi
653828d09e Restore force relayout logic for apps targeting < R
Test: Open IME in Telegram
Fixes: 153832271
Change-Id: I0c26bbaeb22b06718054fccdec0b550129ccecf8
2020-05-04 17:01:09 +02:00
Steven Thomas
940c1c8ace Merge "Split refresh rate range into two ranges" into rvc-dev am: 5724666853 am: a3fa60c689 am: 9babd875b8 am: 15b7137a37
Change-Id: I04d63017087f9d73facd20706540e14e313f068b
2020-05-02 03:21:23 +00:00
Steven Thomas
5724666853 Merge "Split refresh rate range into two ranges" into rvc-dev 2020-05-02 02:12:39 +00:00
Andrew Sapperstein
975ca816ec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-02 00:21:33 +00:00
Feng Cao
3a7f16b1d1 Merge "Support receiving touch event in the inline suggestion view" into rvc-dev am: 4e20f2b97c am: 7783a9a800 am: 2c0f518084 am: b462d37a0f
Change-Id: I9ed24e99cc862a739cef76d6614a54491305ed9d
2020-05-01 23:19:52 +00:00
Feng Cao
4e20f2b97c Merge "Support receiving touch event in the inline suggestion view" into rvc-dev 2020-05-01 22:07:39 +00:00
Feng Cao
c23bfc7819 Support receiving touch event in the inline suggestion view
* Before this change, the suggestionRoot would intercept all touch
  events so that it can optionally forward them to the IME process
  to support scrolling, no touch event will be sent to the child
  view through the regular event dispatching process.
* With this change, we move the touch event transferring (to IME)
  logic from SuggestionRoot's onTouchEvent to dispatchTouchEvent.
  Now the touch events before a scroll is detected will be sent to
  the child chip view, and only the touch events after a scroll is
  detected will be sent to the IME.
* This patch also move the OnClickListener and OnLongClickListener
  from the root view to the chip view, since the touch events now
  either goes to the chip view or to the IME process.
* Note that in order to achieve this, given that we can't change
  the API, and there is existing OnLongClickListener registered
  to the chip view, we have to add a @hide API to the View to
  get the existing OnLongClickListener and attach a new one to the
  chip view, such that we can do the additional work of sending
  the long click event to IME, when the view is long clicked.
* This patch should also fix the a11y talkback mode bug where
  double-tapping on the view doesn't autofill the value.
  Double-tap and hold also works that it triggers the attribution
  dialog.

Test: atest CtsAutoFillServiceTestCases (sanity test)
Bug: 155245913
Bug: 154149807

Change-Id: I6f7be1ea5c0955969abb4ccae0cb421423095c4d
2020-05-01 12:36:51 -07:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
a296471054 Merge "Update inner class constructor refs to use proper syntax." 2020-05-01 18:00:05 +00:00
Abodunrinwa Toki
143b8a9762 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e am: 5eb7265785 am: e076eb2584
Change-Id: I1781f9427954eebd5226ae7cea3170c96fe4de5c
2020-05-01 11:53:18 +00:00
Abodunrinwa Toki
1cf3ce8fde Merge "Rewrite Icons from the TCS." into rvc-dev 2020-05-01 10:52:43 +00:00
Steven Thomas
305a57c5fc Split refresh rate range into two ranges
To prevent low-priority refresh rate considerations from overriding the
app frame rate as specified via the new setFrameRate() api, split the
display refresh rate range into "primary" and "app request" ranges. The
primary range includes the low priority considerations, while the app
request range removes two lower priority considerations.

In general, surface flinger will keep the display refresh rate within
the primary range, but layers with frame rate settings via the
setFrameRate() api may cause surface flinger to pick a refresh rate
outside the primary range. Surface flinger will never choose a refresh
rate outside the app request range specified by display manager.

Bug: 148978562

Test: - Added a new unit test to DisplayModeDirectorTest to verify that
        display manager strips lower priority considerations when
        deciding the app request range.

- Added a new unit test to RefreshRateConfigsTest to verify
  RefreshRateConfigs handles the primary vs app request range
  correctly.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, we don't switch to 60Hz when playing a 60Hz video.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, when an app calls setFrameRate(60), we stay at 60Hz.

- Manual test: Modified a Pixel 4 XL to prefer 60Hz in low brightness,
  entered low brightness, and confirmed we don't touch boost to 90Hz.

- Manual test: Confirmed that Maps stays at 60Hz on Pixel 4.

- Manual test: Turned on verbose logs in RefreshRateConfigs.cpp,
  confirmed they look good.

- Manual test: Inspected dumpsys output, confirmed the primary and
  app request refresh rate ranges are printed correctly.

Change-Id: I2a7f5ded0831c90b9b1ac09d941963a63b824098
2020-04-30 19:58:42 -07:00
TreeHugger Robot
755e3dfafb Merge "Update the documentation for inline suggestion APIs" into rvc-dev am: d725389a55 am: e27ed6a551 am: de871487f3 am: e54bdc1509
Change-Id: I6b3e5fcc212a27e89d7660c752a4babb68b9dbd1
2020-05-01 02:30:17 +00:00
TreeHugger Robot
d725389a55 Merge "Update the documentation for inline suggestion APIs" into rvc-dev 2020-05-01 01:42:05 +00:00
Evan Rosky
411df4e78c Merge "Give Divider back its touch-region" into rvc-dev am: 5a61909275 am: 199e0cf822 am: ae02dfdd7e am: c24f98d65e
Change-Id: I663e0754a06c1ed5f8b8c19f17e9b60ab5cabaaa
2020-05-01 00:55:17 +00:00
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00
Evan Rosky
5a61909275 Merge "Give Divider back its touch-region" into rvc-dev 2020-05-01 00:11:36 +00:00
Taran Singh
c1d504c0c5 Fix IME visibility after lock screen
IME was not able to hide itself correctly after lock screen, resulting
in visibility state being inconsistent.

Bug: 154753046
Test: atest KeyguardLockedTests#testImeShowsAfterLockScreenOnEditorTap
            WindowInsetsControllerTests
Change-Id: Ice33d68e999627b7b62410d22cd51e18f8e23d34
2020-04-30 13:18:53 -07:00
Tiger Huang
da4e5cb4a9 Merge "Ensure the requested insets state is up to date" into rvc-dev am: b8ad491e6d am: 282a713b1a am: 29ea59f79c am: d76c953235
Change-Id: Ibf4eff83cfb7fb39cfa3e3c970d3df23d3533a14
2020-04-30 19:17:50 +00:00
Tiger Huang
b8ad491e6d Merge "Ensure the requested insets state is up to date" into rvc-dev 2020-04-30 17:56:41 +00:00
Adrian Roos
425c1b1cda Merge "WindowInsetsController: make available after addView" into rvc-dev am: 1cd9750aa4 am: 1e672d552d am: 9978475dff am: 6c4ac4b209
Change-Id: If46368ef7e938ea5d03845a38be78ded294e57af
2020-04-30 16:34:17 +00:00
Tiger Huang
173480f29d Ensure the requested insets state is up to date
Previously, the client won't send the modified insets state to window
manager if the dispatched state and the local state are the same. The
following case can make the requested insets state at the server side
stale:

1. Window A requests an insets source to be invisible while having
   the control.
2. Window A loses the control.
3. The new control target requests the insets source to be visible.
4. Window A receives the new insets state from server.
5. Window A also requests the insets source to be visible while not
   having the control.
6. Window A gain the control.
7. Window A won't send the new requested state (visible) to window
   manager because the local state and the dispatched state are the
   same.
8. Window manager keeps assuming that window A is requesting the insets
   source to be invisible which is incorrect.

This CL stores what insets state is sent to server, and updates/sends
the state to server while gaining the control if the requested state is
changed.

Fix: 146964271
Test: Manual.
Change-Id: I6ee533d9316c769faef539bfb980197c351ee8d1
2020-05-01 00:27:38 +08:00
Adrian Roos
1cd9750aa4 Merge "WindowInsetsController: make available after addView" into rvc-dev 2020-04-30 15:40:26 +00:00
Automerger Merge Worker
d20fa451a4 Merge "Merge "Report caption insets change when layout" into rvc-dev am: 9f804f7593 am: e1c304a615" into rvc-d1-dev-plus-aosp am: 5973fc34ac am: 226b24f842
Change-Id: If995ba2c5bf2e0ada02902f037bc92a0a044e3c7
2020-04-30 05:35:06 +00:00
Yunfan Chen
9f804f7593 Merge "Report caption insets change when layout" into rvc-dev 2020-04-30 04:43:47 +00:00
Jeff Sharkey
4cd89d7d40 Merge "Update more Parcelables to send Strings UTF-8." into rvc-dev am: 1eb3fcfb33 am: e9214abdf3 am: 16844ca4e0 am: 4581e4d59d
Change-Id: I09c9c0251c909665eab4a676c85d28fad9d9b047
2020-04-30 00:41:34 +00:00
Jeff Sharkey
1eb3fcfb33 Merge "Update more Parcelables to send Strings UTF-8." into rvc-dev 2020-04-29 23:55:03 +00:00
Evan Rosky
f260048889 Merge "Shift Primary stack as well as secondary during ime adjustment" into rvc-dev am: 650e162195 am: e7c8885f19 am: 642bb1b05f am: 7c73a12435
Change-Id: Id57ddf3be5d4c1a1b23f5ea1c4174e1594102ab2
2020-04-29 21:35:35 +00:00
Evan Rosky
650e162195 Merge "Shift Primary stack as well as secondary during ime adjustment" into rvc-dev 2020-04-29 20:55:18 +00:00
Jeff Sharkey
1639e6b8ee Update more Parcelables to send Strings UTF-8.
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes.  (So an improvement in
both cases!)

Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.

Bug: 154436100
Test: manual
Change-Id: I9a675473e0ce3a4a5c5e305dd851b40bb1560e1c
2020-04-29 14:54:44 -06:00
Andrew Sapperstein
4c4aa41272 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
2020-04-29 13:16:02 -07:00
Jorim Jaggi
8a3dd6f771 Merge "Decouple InsetsController from ViewRootImpl" into rvc-dev am: 1db61c9a6e am: f26b0c6672 am: fa254e366e am: 61f298d90f
Change-Id: I0dc379cbd5a9f72b4c8161e133dc8ec3cf8b2915
2020-04-29 15:15:50 +00:00
Adrian Roos
7794a00407 WindowInsetsController: make available after addView
Fixes an issue where the WindowInsetsController was only available after
the first traversal.

Bug: 155280356
Test: atest WindowInsetsControllerTests
Change-Id: I225efcaa31e97da9e8ebc6bd7d24c433c8e80826
2020-04-29 17:13:57 +02:00