Reject update if static partition is a super block device.

If the static partition is currently used as a super block
device, do not write to it.

Test: manual OTA

Change-Id: I167cfccf7d9df7d09ab633c8928697b57d3b314b
diff --git a/boot_control_android.h b/boot_control_android.h
index d831273..d6590fb 100644
--- a/boot_control_android.h
+++ b/boot_control_android.h
@@ -64,6 +64,24 @@
   // Wrapper method of IBootControl::getSuffix().
   bool GetSuffix(Slot slot, std::string* out) const;
 
+  enum class DynamicPartitionDeviceStatus {
+    SUCCESS,
+    ERROR,
+    TRY_STATIC,
+  };
+
+  DynamicPartitionDeviceStatus GetDynamicPartitionDevice(
+      const base::FilePath& device_dir,
+      const std::string& partition_name_suffix,
+      Slot slot,
+      std::string* device) const;
+
+  // Return true if |partition_name_suffix| is a block device of
+  // super partition metadata slot |slot|.
+  bool IsSuperBlockDevice(const base::FilePath& device_dir,
+                          Slot slot,
+                          const std::string& partition_name_suffix) const;
+
   DISALLOW_COPY_AND_ASSIGN(BootControlAndroid);
 };