Merge "Fix npe due to strict mode in Bitmap.sameAs" into oc-dev

am: 8d2b02bf08

Change-Id: I88c7ffb54b3dfc12a24594c20a7b3787f81dc028
This commit is contained in:
Sergey Vasilinets
2017-05-10 23:46:50 +00:00
committed by android-build-merger

View File

@@ -1869,9 +1869,9 @@ public final class Bitmap implements Parcelable {
public boolean sameAs(Bitmap other) {
checkRecycled("Can't call sameAs on a recycled bitmap!");
noteHardwareBitmapSlowCall();
other.noteHardwareBitmapSlowCall();
if (this == other) return true;
if (other == null) return false;
other.noteHardwareBitmapSlowCall();
if (other.isRecycled()) {
throw new IllegalArgumentException("Can't compare to a recycled bitmap!");
}