Support SELinux context label when mounting

If there is a SELinux context label in the recovery.fstab, we should
honor that when mounting the partition.

Bug: 19764039
Change-Id: I4df71a092b418cd340a18b2e3b0936de33d8e3f5
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 3d0da88..281ed59 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -177,9 +177,12 @@
           if "=" in option:
             key, value = option.split("=", 1)
             mount_dict[key] = value
+      mount_flags = mount_dict.get(p.fs_type, "")
+      if p.context is not None:
+        mount_flags = p.context + ("," + mount_flags if mount_flags else "")
       self.script.append('mount("%s", "%s", "%s", "%s", "%s");' % (
           p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device,
-          p.mount_point, mount_dict.get(p.fs_type, "")))
+          p.mount_point, mount_flags))
       self.mounts.add(p.mount_point)
 
   def UnpackPackageDir(self, src, dst):