Loading include/input/PrintTools.h +5 −4 Original line number Diff line number Diff line Loading @@ -117,11 +117,12 @@ std::string dumpMapKeys(const std::map<K, V>& map, template <typename T> std::string dumpVector(const std::vector<T>& values, std::string (*valueToString)(const T&) = constToString) { std::string dump = valueToString(values[0]); for (size_t i = 1; i < values.size(); i++) { dump += ", " + valueToString(values[i]); std::string out; for (const auto& value : values) { out += out.empty() ? "[" : ", "; out += valueToString(value); } return dump; return out.empty() ? "[]" : (out + "]"); } const char* toString(bool value); Loading libs/binder/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -258,7 +258,9 @@ cc_defaults { "-DBINDER_DISABLE_NATIVE_HANDLE", "-DBINDER_DISABLE_BLOB", "-DBINDER_NO_LIBBASE", // TODO: switch to "vendor: true" rather than copying this // Trusty libbinder uses vendor stability for its binders "-D__ANDROID_VENDOR__", "-D__ANDROID_VNDK__", "-U__ANDROID__", "-D__TRUSTY__", Loading libs/binder/Stability.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,14 @@ void Stability::tryMarkCompilationUnit(IBinder* binder) { (void)setRepr(binder, getLocalLevel(), REPR_NONE); } // after deprecation of the VNDK, these should be aliases. At some point // all references to __ANDROID_VNDK__ should be replaced by __ANDROID_VENDOR__ // but for right now, check that this condition holds because some // places check __ANDROID_VNDK__ and some places check __ANDROID_VENDOR__ #if defined(__ANDROID_VNDK__) != defined(__ANDROID_VENDOR__) #error "__ANDROID_VNDK__ and __ANDROID_VENDOR__ should be aliases" #endif Stability::Level Stability::getLocalLevel() { #ifdef __ANDROID_APEX__ #error "APEX can't use libbinder (must use libbinder_ndk)" Loading libs/binder/trusty/kernel/rules.mk +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ GLOBAL_COMPILEFLAGS += \ -DBINDER_DISABLE_NATIVE_HANDLE \ -DBINDER_DISABLE_BLOB \ -DBINDER_NO_LIBBASE \ -D__ANDROID_VENDOR__ \ -D__ANDROID_VNDK__ \ MODULE_DEPS += \ Loading libs/binder/trusty/rules.mk +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ MODULE_EXPORT_COMPILEFLAGS += \ -DBINDER_DISABLE_NATIVE_HANDLE \ -DBINDER_DISABLE_BLOB \ -DBINDER_NO_LIBBASE \ -D__ANDROID_VENDOR__ \ -D__ANDROID_VNDK__ \ # libbinder has some deprecated declarations that we want to produce warnings Loading Loading
include/input/PrintTools.h +5 −4 Original line number Diff line number Diff line Loading @@ -117,11 +117,12 @@ std::string dumpMapKeys(const std::map<K, V>& map, template <typename T> std::string dumpVector(const std::vector<T>& values, std::string (*valueToString)(const T&) = constToString) { std::string dump = valueToString(values[0]); for (size_t i = 1; i < values.size(); i++) { dump += ", " + valueToString(values[i]); std::string out; for (const auto& value : values) { out += out.empty() ? "[" : ", "; out += valueToString(value); } return dump; return out.empty() ? "[]" : (out + "]"); } const char* toString(bool value); Loading
libs/binder/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -258,7 +258,9 @@ cc_defaults { "-DBINDER_DISABLE_NATIVE_HANDLE", "-DBINDER_DISABLE_BLOB", "-DBINDER_NO_LIBBASE", // TODO: switch to "vendor: true" rather than copying this // Trusty libbinder uses vendor stability for its binders "-D__ANDROID_VENDOR__", "-D__ANDROID_VNDK__", "-U__ANDROID__", "-D__TRUSTY__", Loading
libs/binder/Stability.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,14 @@ void Stability::tryMarkCompilationUnit(IBinder* binder) { (void)setRepr(binder, getLocalLevel(), REPR_NONE); } // after deprecation of the VNDK, these should be aliases. At some point // all references to __ANDROID_VNDK__ should be replaced by __ANDROID_VENDOR__ // but for right now, check that this condition holds because some // places check __ANDROID_VNDK__ and some places check __ANDROID_VENDOR__ #if defined(__ANDROID_VNDK__) != defined(__ANDROID_VENDOR__) #error "__ANDROID_VNDK__ and __ANDROID_VENDOR__ should be aliases" #endif Stability::Level Stability::getLocalLevel() { #ifdef __ANDROID_APEX__ #error "APEX can't use libbinder (must use libbinder_ndk)" Loading
libs/binder/trusty/kernel/rules.mk +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ GLOBAL_COMPILEFLAGS += \ -DBINDER_DISABLE_NATIVE_HANDLE \ -DBINDER_DISABLE_BLOB \ -DBINDER_NO_LIBBASE \ -D__ANDROID_VENDOR__ \ -D__ANDROID_VNDK__ \ MODULE_DEPS += \ Loading
libs/binder/trusty/rules.mk +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ MODULE_EXPORT_COMPILEFLAGS += \ -DBINDER_DISABLE_NATIVE_HANDLE \ -DBINDER_DISABLE_BLOB \ -DBINDER_NO_LIBBASE \ -D__ANDROID_VENDOR__ \ -D__ANDROID_VNDK__ \ # libbinder has some deprecated declarations that we want to produce warnings Loading