Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b496364b authored by Zhekai Hu's avatar Zhekai Hu
Browse files

Assign notifyVirtualChildrenAppeared to run on background thread

Test: atest android.view.contentcapture.LoginTest
Flag: android.view.contentcapture.flags.enable_export_assist_virtual_node_to_ccapi
Bug: 430421182
Change-Id: Ib327f8f839f97e1dd4832979af651b23cace5673
parent 206e7430
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1036,11 +1036,12 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
                            && structure.getAutofillId() != null
                            && mManager.isContentCaptureConditionEnabled(
                                    CONDITION_ENABLE_EXPORTING_VIRTUAL_CHILDREN)) {
                        // TODO: Move this to a background thread to improve performance.
                        runOnContentCaptureThread(() -> {
                            Trace.beginSection("notifyVirtualChildrenAppeared");
                            notifyVirtualChildrenAppeared(session, structure.getAutofillId(),
                                    view.getAccessibilityNodeProvider());
                            Trace.endSection();
                        });
                    }
                    structureSession.setSession(session);
                    structureSession.setStructure(structure);