mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
instrument: fix DrawableMatcher for varying contexts
This commit is contained in:
parent
675df57abd
commit
2a05e2a17b
@ -102,7 +102,7 @@ public class DrawableMatcher extends TypeSafeMatcher<View> {
|
||||
}
|
||||
// if those are both bitmap drawables, compare their bitmaps (ignores color filters, which is what we want!)
|
||||
if (mIgnoreFilters && drawable instanceof BitmapDrawable && expectedDrawable instanceof BitmapDrawable) {
|
||||
return ((BitmapDrawable) drawable).getBitmap().equals(((BitmapDrawable) expectedDrawable).getBitmap());
|
||||
return ((BitmapDrawable) drawable).getBitmap().sameAs((((BitmapDrawable) expectedDrawable).getBitmap()));
|
||||
}
|
||||
return expectedDrawable.getConstantState().equals(drawable.getConstantState());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user