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

Commit 335a6e0f authored by Peter Qiu's avatar Peter Qiu
Browse files

graphics: Icon: use Arrays#equals for byte array comparison

Bug: 62258815
Test: build

Change-Id: I95b7b7b663a8067aea40f36944003901afd8988c
parent bcb5bca1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Objects;

/**
@@ -493,7 +494,7 @@ public final class Icon implements Parcelable {
            case TYPE_DATA:
                return getDataLength() == otherIcon.getDataLength()
                        && getDataOffset() == otherIcon.getDataOffset()
                        && getDataBytes() == otherIcon.getDataBytes();
                        && Arrays.equals(getDataBytes(), otherIcon.getDataBytes());
            case TYPE_RESOURCE:
                return getResId() == otherIcon.getResId()
                        && Objects.equals(getResPackage(), otherIcon.getResPackage());