Fix a failure in signing test

Pixel moved away from sparse images, so validate_target_files is failing
because it expects sparse images.

Test: th
Change-Id: I322ff10c2afbacfb4d78991be60c11aac92a6d4c
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 2ee4b8e..1937f29 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -3953,3 +3953,10 @@
     OPTIONS.replace_updated_files_list.append(care_map_path)
   else:
     ZipWrite(output_file, temp_care_map, arcname=care_map_path)
+
+
+def IsSparseImage(filepath):
+  with open(filepath, 'rb') as fp:
+    # Magic for android sparse image format
+    # https://source.android.com/devices/bootloader/images
+    return fp.read(4) == b'\x3A\xFF\x26\xED'