update_engine: Remove android specific code from cros
These codes are not compiled in aosp.
BUG=b:171829801
TEST=None
Change-Id: I81fd8202d3fb5f86775a6efe202f7f4f86ae1089
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2518385
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/cros/omaha_response_handler_action_unittest.cc b/cros/omaha_response_handler_action_unittest.cc
index 8da3205..b05660c 100644
--- a/cros/omaha_response_handler_action_unittest.cc
+++ b/cros/omaha_response_handler_action_unittest.cc
@@ -448,11 +448,6 @@
fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
params.set_root(tempdir.GetPath().value());
params.set_current_channel("canary-channel");
- // The ImageProperties in Android uses prefs to store MutableImageProperties.
-#ifdef __ANDROID__
- EXPECT_CALL(*fake_system_state_.mock_prefs(), SetBoolean(_, true))
- .WillOnce(Return(true));
-#endif // __ANDROID__
EXPECT_TRUE(params.SetTargetChannel("stable-channel", true, nullptr));
params.UpdateDownloadChannel();
params.set_app_version("2.0.0.0");
@@ -481,12 +476,6 @@
fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
params.set_root(tempdir.GetPath().value());
params.set_current_channel("canary-channel");
- // The |ImageProperties| in Android uses prefs to store
- // |MutableImageProperties|.
-#ifdef __ANDROID__
- EXPECT_CALL(*fake_system_state_.mock_prefs(), SetBoolean(_, true))
- .WillOnce(Return(true));
-#endif // __ANDROID__
EXPECT_TRUE(params.SetTargetChannel("stable-channel", false, nullptr));
params.UpdateDownloadChannel();
params.set_app_version("2.0.0.0");
@@ -515,12 +504,6 @@
fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
params.set_root(tempdir.GetPath().value());
params.set_current_channel("beta-channel");
- // The |ImageProperties| in Android uses prefs to store
- // |MutableImageProperties|.
-#ifdef __ANDROID__
- EXPECT_CALL(*fake_system_state_.mock_prefs(), SetBoolean(_, true))
- .WillOnce(Return(true));
-#endif // __ANDROID__
EXPECT_TRUE(params.SetTargetChannel("stable-channel", true, nullptr));
params.UpdateDownloadChannel();
params.set_app_version("12345.48.0.0");
@@ -675,11 +658,6 @@
fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
params.set_root(tempdir.GetPath().value());
params.set_current_channel("stable-channel");
- // The ImageProperties in Android uses prefs to store MutableImageProperties.
-#ifdef __ANDROID__
- EXPECT_CALL(*fake_system_state_.mock_prefs(), SetBoolean(_, false))
- .WillOnce(Return(true));
-#endif // __ANDROID__
EXPECT_TRUE(params.SetTargetChannel("canary-channel", false, nullptr));
params.UpdateDownloadChannel();
params.set_app_version("1.0.0.0");
diff --git a/cros/update_attempter.cc b/cros/update_attempter.cc
index e8cb291..e9098de 100644
--- a/cros/update_attempter.cc
+++ b/cros/update_attempter.cc
@@ -981,14 +981,6 @@
}
bool UpdateAttempter::RebootIfNeeded() {
-#ifdef __ANDROID__
- if (status_ != UpdateStatus::UPDATED_NEED_REBOOT) {
- LOG(INFO) << "Reboot requested, but status is "
- << UpdateStatusToString(status_) << ", so not rebooting.";
- return false;
- }
-#endif // __ANDROID__
-
if (system_state_->power_manager()->RequestReboot())
return true;