Fix temporary directory path in Android.
We should use /data/misc/update_engine/tmp instead of /data/local/tmp.
Bug: 24478450
TEST=Delta update nolonger permission denied.
Change-Id: I9a8096e602320195d30147971def5145bd82d775
diff --git a/common/hardware_android.cc b/common/hardware_android.cc
index 4f06ff2..abfca44 100644
--- a/common/hardware_android.cc
+++ b/common/hardware_android.cc
@@ -21,16 +21,10 @@
#include <cutils/properties.h>
#include "update_engine/common/hardware.h"
+#include "update_engine/common/platform_constants.h"
using std::string;
-namespace {
-
-// The stateful directory used by update_engine.
-const char kNonVolatileDirectory[] = "/data/misc/update_engine";
-
-} // namespace
-
namespace chromeos_update_engine {
namespace hardware {
@@ -102,7 +96,7 @@
}
bool HardwareAndroid::GetNonVolatileDirectory(base::FilePath* path) const {
- base::FilePath local_path(kNonVolatileDirectory);
+ base::FilePath local_path(constants::kNonVolatileDirectory);
if (!base::PathExists(local_path)) {
LOG(ERROR) << "Non-volatile directory not found: " << local_path.value();
return false;