summaryrefslogtreecommitdiff
path: root/base/include/android-base/errors.h
diff options
context:
space:
mode:
authorSpencer Low <CompareAndSwap@gmail.com>2015-10-21 22:22:50 -0700
committerSpencer Low <CompareAndSwap@gmail.com>2015-11-10 15:48:54 -0800
commitac9514a4524f98b2029dbcda9326a763d25492b1 (patch)
tree9d33845468022540c4f8debe60e82a06ea8cb628 /base/include/android-base/errors.h
parent48f2e1ed317f6a330b129c788bd19dac2a4df8ad (diff)
adb/base: fix adb push of Unicode filenames on Win32
ae5a6c06cdd9ae1a0a7cdc42711f0a5594e54dcd made adb push use android::base::ReadFileToString() for small files, but that API did not support UTF-8 filenames on Windows, until this fix which does the following: - Add android::base::{WideToUTF8,UTF8ToWide}() which are only available on Windows. The signatures are based on Chromium's APIs of the same name. - Add the namespace android::base::utf8 which has versions of APIs that take UTF-8 strings. To use this, make sure your code is in a namespace and then do "using namespace android::base::utf8;". On Windows, this will make calls to open() call android::base::utf8::open(), and on other platforms, it will just call the regular ::open(). - Make ReadFileToString() and WriteStringToFile() use utf8::open() and utf8::unlink(). - Adapt unittests from Chromium. - fastboot needs to link with libcutils because it links with libbase which depends on libcutils for gettid() for logging. Change-Id: I1aeac40ff358331d7a1ff457ce894bfb17863904 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
Diffstat (limited to 'base/include/android-base/errors.h')
0 files changed, 0 insertions, 0 deletions