am 0f0af20d: am 5df6b5c3: Merge "sparse_img.py: Don\'t write empty map groups."

* commit '0f0af20d6d4fa7d75f7dd8569f713e68eb0cad46':
  sparse_img.py: Don't write empty map groups.
This commit is contained in:
Tao Bao 2015-06-27 16:58:36 +00:00 committed by Android Git Automerger
commit 929fbe7d37

View file

@ -221,9 +221,14 @@ class SparseImage(object):
nonzero_blocks.append(b)
nonzero_blocks.append(b+1)
out["__ZERO"] = rangelib.RangeSet(data=zero_blocks)
out["__NONZERO"] = rangelib.RangeSet(data=nonzero_blocks)
out["__COPY"] = clobbered_blocks
assert zero_blocks or nonzero_blocks or clobbered_blocks
if zero_blocks:
out["__ZERO"] = rangelib.RangeSet(data=zero_blocks)
if nonzero_blocks:
out["__NONZERO"] = rangelib.RangeSet(data=nonzero_blocks)
if clobbered_blocks:
out["__COPY"] = clobbered_blocks
def ResetFileMap(self):
"""Throw away the file map and treat the entire image as