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

Commit 20948113 authored by Stephen Hines's avatar Stephen Hines
Browse files

Update Element.isCompatible() to work with NONE.

In the past, we used a null reference to signify a user-created Element. The
use of DataType.NONE for user-created Elements thus required an update to our
Element compatibility check.

Change-Id: I3293a645eff85c9040487c22f3a3240862f74350
parent 03290d27
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -933,10 +933,10 @@ public class Element extends BaseObj {

        // Ignore mKind because it is allowed to be different (user vs. pixel).
        // We also ignore mNormalized because it can be different. The mType
        // field must be non-null since we require name equivalence for
        // user-created Elements.
        // field must not be NONE since we require name equivalence for
        // all user-created Elements.
        return ((mSize == e.mSize) &&
                (mType != null) &&
                (mType != DataType.NONE) &&
                (mType == e.mType) &&
                (mVectorSize == e.mVectorSize));
    }