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

Commit 637efbaa authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

ImageDecoder: compare Strings with .equals()

Bug: 143231863
Test: Infeasible?

Previously we compared with "==", which requires that the two String
objects be the same to return true. We want to return true if the two
Strings are logically equal, even if they are different objects.

Prior to this commit, we may have accidentally called
openAssetFileDescriptor when we should have called
openTypedAssetFileDescriptor.

Change-Id: I9229039b752bafa9a9b85b914a62093dff1eec34
parent 2e82e39c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ public final class ImageDecoder implements AutoCloseable {
        public ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException {
            AssetFileDescriptor assetFd = null;
            try {
                if (mUri.getScheme() == ContentResolver.SCHEME_CONTENT) {
                if (mUri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) {
                    assetFd = mResolver.openTypedAssetFileDescriptor(mUri,
                            "image/*", null);
                } else {