Commit Graph

4 Commits

Author SHA1 Message Date
Vadim Tryshev c6352a55f3 Implementing detector of view flashes
I.e. when a view appears or disappears for a short time.

Moving some common parts of AlphaJumpDetector and FlashDetector to their parent class, AnomalyDetector, and moving AnomalyDetector to a separate file.

Also tweaking the code a bit.

Flag: N/A
Test: presubmit, local runs
Bug: 286251603
Change-Id: I022e68eb90147abd3ed4ee3b285d672bb19c997d
2023-08-04 18:56:10 -07:00
Vadim Tryshev 189f115e83 Detecting multiple view animation anomalies.
Now detecting all anomalies that were detected during the test. This helps to avoid rerunning the test multiple times and adding anomalies to the ignore-list one by one.

Generating a file with all detected anomalies and instructions how to suppress them.

Flag: N/A
Test: presubmit, local runs
Bug: 286251603
Change-Id: I0c34d228f91976451b518fd44873218b80178d0e
2023-07-31 18:03:48 -07:00
Vadim Tryshev 4824afe538 Optimizing application of the ignore-list of nodes for AlphaJumpDetector.
Instead of building the full path of each node, and then searching it in the PATHS_TO_IGNORE set, we are descending the tree of the nodes to ignore. This saves us building the whole path for each node.

Now that AlphaJumpDetector has more fields specifically for alpha jump detection in AnalysisNode, I’ve introduced an abstraction of per-detector data in AnalysisNode, see the ‘detectorsData’ field. Each detector (alpha jumps, flash, position jump), will be able to add its own data to AnalysisNode without polluting it.

Flag: N/A
Test: presubmit, local runs
Bug: 286251603
Change-Id: Iac8504edfe43407a75e7fc4a39e21bfca502b090
2023-07-27 15:26:11 -07:00
vadimt ad6ebab887 View capture analyzer tree walker + Alpha jump detector V1
The analyzer is an utility that can be used from the test, and not only.
If an anomaly (such as a sudden jump of view’s coordinates between frames) is detected, the utility will throw an error.

The CL includes an early version of detectors for one of the anomalies we plan to detect: alpha jump (included), flash, position jump.

The analysis is currently not invoked from tests, we simply are adding the code.

Alpha jump detector:
The included alpha jump detector contains a long (but still incomplete) list of views for which we ignore alpha jumps. This list should go away after view capture data begins supporting fields like “ignore alpha jumps for this view”.

We currently detect only alpha jumps by 100%, i.e. when the view switches from completely opaque state to completely invisible or vice versa.

ScrimView treatment:
Since we don’t know at the moment whether ScrimView is opaque, we currently ignore all activity under it.

Bug: 286251603
Flag: N/A
Test: manually on Launcher hacked to invoke this analyzer
Change-Id: Ic86aff561a0c273afd7714d8287cb724bb2aecaf
2023-06-21 16:16:28 -07:00