Commit Graph

14669 Commits

Author SHA1 Message Date
Leon Scroggins
d50178eae6 Merge "Switch Java calls to enableZ and disableZ; remove isRecordingFor" 2020-05-07 18:07:22 +00:00
Jorim Jaggi
2a15b259dc Merge "Cancel existing animations when detaching View" into rvc-dev am: b3c02592e1 am: c20c5a5de1 am: 356e907d3b am: b429d3b936
Change-Id: I8262ff6c0aa2eef95a521535e10f98ae5f81be83
2020-05-07 12:37:10 +00:00
Jorim Jaggi
b3c02592e1 Merge "Cancel existing animations when detaching View" into rvc-dev 2020-05-07 11:36:11 +00:00
Feng Cao
571fa86530 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev am: 254545cae5 am: f9748230fd am: 35c8ea2a8b am: 9c116694b4
Change-Id: Ic8bdf26c2194d779d9d313d8cfb30b65857064c4
2020-05-07 06:15:23 +00:00
Feng Cao
254545cae5 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev 2020-05-07 05:23:15 +00:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Taran Singh
0efe92c61a Merge "Revert "Keeps the served view of the window when focus to the ne..."" into rvc-dev am: e974c347fd am: 57305841de am: 1e9ccb8a60 am: deb5c075ea
Change-Id: I684742c848ba4fbd44763f86e0076a92f1fe265f
2020-05-06 22:14:54 +00:00
Taran Singh
e974c347fd Merge "Revert "Keeps the served view of the window when focus to the ne..."" into rvc-dev 2020-05-06 21:06:34 +00:00
Taran Singh
0dbd6c4bd6 Revert "Keeps the served view of the window when focus to the ne..."
Revert "Refine FocusHandlingTest"

Revert submission 11182377-fix_b_152373385

Reason for revert: Fix b/155781821
Reverted Changes:
If20cdb43e:Keeps the served view of the window when focus to ...
I50402165b:Refine FocusHandlingTest
Bug: 152373385
Bug: 155781821

Change-Id: I44469caf5a5ceaf247c4e6b0694da9da1f3c0eb1
2020-05-06 20:37:09 +00:00
Jorim Jaggi
31e5254daf Cancel existing animations when detaching View
Test: WindowInsetsAnimationSynchronicityTests#testShowAndHide_renderSynchronouslyBetweenImeWindowAndAppContent * 100 times
Fixes: 155602643
Change-Id: I6f736357f5a67c01a29b2c531026a3a76c321003
2020-05-06 20:36:08 +02:00
Leon Scroggins III
0f53e10c07 Switch Java calls to enableZ and disableZ; remove isRecordingFor
Bug: 155422223
Test: make

insertInOrderBarrier and insertReorderBarrier are @hide and deprecated.
Remove them and update all callers to enableZ and disableZ, which are
already public.

Update native code to refer to enableZ instead of insertReorderBarrier.

In addition, remove @hide Canvas#isRecordingFor. This method was
originally used to prevent a single RenderNode from being in two display
lists. This is now supported, so there's no reason to avoid it. The one
caller used it to determine whether to reorder drawing its child Views
(which, as the comment says, makes sense to determine based on whether
the Canvas isHardwareAccelerated) and whether to call
insertReorderBarrier/insertInOrderBarrier (now enableZ/disableZ). In the
latter case, there is no need for a conditional, since enableZ/disableZ
only work on a hardware Canvas.

Change-Id: Ib216a19d6aeff40b2e23532bacd62d1795c2ab27
2020-05-06 09:38:39 -04:00
Tony Huang
9c6915ec64 Merge "Aviod divider surface memory allocated after boot" into rvc-dev am: e13e2229ce am: 38c1cbce50 am: 8297343685 am: 2340f1ce0f
Change-Id: I067915a3749274158b59fea4b1a14a2e7c172f4c
2020-05-06 05:27:40 +00:00
Tony Huang
e13e2229ce Merge "Aviod divider surface memory allocated after boot" into rvc-dev 2020-05-06 04:39:14 +00:00
Yuncheol Heo
023fbdd036 Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev am: d1cfb337cf am: 493b5e0048 am: fd59d085d6 am: b79d61c68c
Change-Id: I042a26ffccb9150c197c8454feb165e4fefb5a82
2020-05-05 23:34:45 +00:00
Yuncheol Heo
d1cfb337cf Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev 2020-05-05 22:56:42 +00:00
Yuncheol Heo
11df7e13a8 Revert "Notify the visibility change to update color views without control."
This reverts commit 02d3a8ad07.

Reason for revert: the original change caused the infinite message loop.
Bug: 155794233

Change-Id: I3d72541cd51cd8b16ce4f44124d486b4615b09da
2020-05-05 22:56:27 +00:00
Tony Huang
0f8981d9b1 Aviod divider surface memory allocated after boot
The divider surface buffer will be allocated even if the user does
not enter split mode. Avoid it by only copy surface when it show and
release it when it hidden.

Bug: 150190730
Test: reboot and check adb shell dumpsys SurfaceFlinger
Change-Id: Id70a2626b2a921cff6243d992c6b053e329ef92b
2020-05-05 18:52:14 +08:00
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