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

Commit 30f156ad authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removing a method that simply returns false" into ub-launcher3-master

parents 0ca024d2 49455405
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ public class LogEventChecker {

            List<String> actual = new ArrayList<>(actualEvents.getNonNull(sequence));
            final int mismatchPosition = getMismatchPosition(expectedEvents.getValue(), actual);
            hasMismatches = hasMismatches
                    || mismatchPosition != -1 && !ignoreMistatch(successfulGesture, sequence);
            hasMismatches = hasMismatches || mismatchPosition != -1;
            formatSequenceWithMismatch(
                    sb,
                    sequence,
@@ -106,8 +105,7 @@ public class LogEventChecker {
        // Check for unexpected event sequences in the actual data.
        for (String actualNamedSequence : actualEvents.keySet()) {
            if (!mExpectedEvents.containsKey(actualNamedSequence)) {
                hasMismatches = hasMismatches
                        || !ignoreMistatch(successfulGesture, actualNamedSequence);
                hasMismatches = true;
                formatSequenceWithMismatch(
                        sb,
                        actualNamedSequence,
@@ -120,13 +118,6 @@ public class LogEventChecker {
        return hasMismatches ? "mismatching events: " + sb.toString() : null;
    }

    // Workaround for b/154157191
    private static boolean ignoreMistatch(boolean successfulGesture, String sequence) {
        // b/156287114
        return false;
//        return TestProtocol.SEQUENCE_TIS.equals(sequence) && successfulGesture;
    }

    // If the list of actual events matches the list of expected events, returns -1, otherwise
    // the position of the mismatch.
    private static int getMismatchPosition(List<Pattern> expected, List<String> actual) {