OSDN Git Service

Changed Content Catpure workflow so it notifies when multiple changes are made.
authorFelipe Leme <felipeal@google.com>
Fri, 22 Feb 2019 17:26:29 +0000 (09:26 -0800)
committerFelipe Leme <felipeal@google.com>
Fri, 22 Feb 2019 22:57:51 +0000 (14:57 -0800)
commit544b39cbd2d3267326341510cc3d9963a57e6180
treea494c800d11ea1f376cdfc86ab73f7ec07cfdd19
parentd58c1eaadabcc3828b58bb0808f2d0c5214ad34d
Changed Content Catpure workflow so it notifies when multiple changes are made.

Prior to this change, it sent a pair TYPE_INITIAL_VIEW_TREE_APPEARING and
TYPE_INITIAL_VIEW_TREE_APPEARED after the initial layout, then it would send invididual events for
the views appeared / disappeared.

This change improves the workflow by also sending this pair of events after each change, which lets
the service know that a bunch of changes were made at the same layout pass.

Test: atest CtsContentCaptureServiceTestCases # which was updated to listen to the new events
Test: m update-api

Bug: 125395044

Change-Id: Ied9def9c95dd0f7711f59bccb2cc89a766fdc36b
core/java/android/view/View.java
core/java/android/view/ViewRootImpl.java
core/java/android/view/contentcapture/ChildContentCaptureSession.java
core/java/android/view/contentcapture/ContentCaptureEvent.java
core/java/android/view/contentcapture/ContentCaptureSession.java
core/java/android/view/contentcapture/MainContentCaptureSession.java