Fix non-critical updates on boards without an OOBE flow.

A recent change in the policy made update_engine to ignore available
updates if the OOBE flow is not completed and the update is not
critical. Nevertheless, some custom boards don't have a OOBE flow as
Chromebooks do and set is_oobe_enabled=false in the policy manager.
These board were not getting regular updates because the OOBE flow is
considered not completed in those cases.

This patch moves the is_oobe_enabled flag to the HardwareInterface class
together with the IsOOBEComplete() method and updates the callers to
check the IsOOBEEnabled() value before.

Bug: 28460247
Bug: 28553821
TEST=Added unittest for the disabled and not complete case.

Change-Id: Ifd3ac2dc5e7a43f6c24eb014b7e3eacad22e3ab3
diff --git a/hardware_android.cc b/hardware_android.cc
index a20fe6f..60e26f2 100644
--- a/hardware_android.cc
+++ b/hardware_android.cc
@@ -68,8 +68,13 @@
   return property_get_bool("ro.debuggable", 0) != 1;
 }
 
+bool HardwareAndroid::IsOOBEEnabled() const {
+  // No OOBE flow blocking updates for Android-based boards.
+  return false;
+}
+
 bool HardwareAndroid::IsOOBEComplete(base::Time* out_time_of_oobe) const {
-  LOG(WARNING) << "STUB: Assuming OOBE is complete.";
+  LOG(WARNING) << "OOBE is not enabled but IsOOBEComplete() called.";
   if (out_time_of_oobe)
     *out_time_of_oobe = base::Time();
   return true;