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

Commit b45e0b09 authored by Artem Iglikov's avatar Artem Iglikov
Browse files

Revert "Use structural equality for A11yNodeInfo#mChildNodeIds"

This reverts commit df99184a.

Reason for revert: Crashes settings - b/73440274

Bug: 73440274
Change-Id: I529874a6110e04d6b5b7723906a03330cd637d1d
parent df99184a
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -18,10 +18,8 @@ package android.util;

import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Preconditions;

import libcore.util.EmptyArray;

import java.util.Arrays;
import libcore.util.EmptyArray;

/**
 * Implements a growing array of long primitives.
@@ -218,17 +216,4 @@ public class LongArray implements Cloneable {
            throw new ArrayIndexOutOfBoundsException(mSize, index);
        }
    }

    /**
     * Test if each element of {@code a} equals corresponding element from {@code b}
     */
    public static boolean elementsEqual(LongArray a, LongArray b) {
        if (a.mSize != b.mSize) return false;
        for (int i = 0; i < a.mSize; i++) {
            if (a.get(i) != b.get(i)) {
                return false;
            }
        }
        return true;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -3194,7 +3194,7 @@ public class AccessibilityNodeInfo implements Parcelable {
        fieldIndex++;
        if (mConnectionId != DEFAULT.mConnectionId) nonDefaultFields |= bitAt(fieldIndex);
        fieldIndex++;
        if (!LongArray.elementsEqual(mChildNodeIds, DEFAULT.mChildNodeIds)) {
        if (!Objects.equals(mChildNodeIds, DEFAULT.mChildNodeIds)) {
            nonDefaultFields |= bitAt(fieldIndex);
        }
        fieldIndex++;