]> git.notmuchmail.org Git - apitrace/commitdiff
Android: hard code the trace file path to be under /data
authorImre Deak <imre.deak@intel.com>
Fri, 30 Mar 2012 12:45:38 +0000 (15:45 +0300)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 13 Apr 2012 06:10:40 +0000 (07:10 +0100)
On Android for Dalvik applications cwd is preset to that of the zygote
(app_process) process and it's the root directory. Since root is r/o
mounted by default it's more convenient to have the trace file in /data
which is writeable at least by root by default.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
common/trace_writer_local.cpp

index a3ab720b2dd13f9c89536e4905ed63981ead0b2f..5aeedac520febb823ad08e86aa10bd30a05a24ca 100644 (file)
@@ -89,7 +89,11 @@ LocalWriter::open(void) {
 #endif
         process.trimDirectory();
 
-        os::String prefix = os::getCurrentDir();
+#ifdef ANDROID
+       os::String prefix = "/data";
+#else
+       os::String prefix = os::getCurrentDir();
+#endif
         prefix.join(process);
 
         for (;;) {