summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorOleksandr Peletskyi <peletskyi@google.com>2016-04-26 13:51:24 +0200
committerOleksandr Peletskyi <peletskyi@google.com>2016-04-26 13:55:06 +0200
commit17fcb6c9f3b235bc0c6bdfc433cbd6f1c7042fc4 (patch)
tree907b73359d801845d86b25165b8c1b79ec6645b3 /libs
parent201596a4d36460eca5cd9446cce7df9c192561fb (diff)
downloadplatform_cts-17fcb6c9f3b235bc0c6bdfc433cbd6f1c7042fc4.tar.gz
platform_cts-17fcb6c9f3b235bc0c6bdfc433cbd6f1c7042fc4.tar.bz2
platform_cts-17fcb6c9f3b235bc0c6bdfc433cbd6f1c7042fc4.zip
Fixed compareBitmaps(Bitmap bmp1, Bitmap bmp2) method.
Fixed compareBitmaps(Bitmap bmp1, Bitmap bmp2) method for the case, when one of the parameters is null. Bug:28383383 Change-Id: I2c5379427c3e6c5ff3dec928eec2e21d9a7903d1
Diffstat (limited to 'libs')
-rw-r--r--libs/deviceutil/src/android/cts/util/BitmapUtils.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/deviceutil/src/android/cts/util/BitmapUtils.java b/libs/deviceutil/src/android/cts/util/BitmapUtils.java
index 723442597ef..157ee27bd25 100644
--- a/libs/deviceutil/src/android/cts/util/BitmapUtils.java
+++ b/libs/deviceutil/src/android/cts/util/BitmapUtils.java
@@ -36,6 +36,10 @@ public class BitmapUtils {
return true;
}
+ if (bmp1 == null || bmp2 == null) {
+ return false;
+ }
+
if ((bmp1.getWidth() != bmp2.getWidth()) || (bmp1.getHeight() != bmp2.getHeight())) {
return false;
}