Merge "Lose convertToResPath to aapt." into main am: 92ad0d32c0
am: 5ba379817d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1764798 Change-Id: I7c2163161a39f4ea3fb805a360ffffeeac7da59f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
f0ee03c429
|
@ -39,10 +39,6 @@
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
// Separator used by resource paths. This is not platform dependent contrary
|
|
||||||
// to OS_PATH_SEPARATOR.
|
|
||||||
#define RES_PATH_SEPARATOR '/'
|
|
||||||
|
|
||||||
static inline char* getEmptyString() {
|
static inline char* getEmptyString() {
|
||||||
static SharedBuffer* gEmptyStringBuf = [] {
|
static SharedBuffer* gEmptyStringBuf = [] {
|
||||||
SharedBuffer* buf = SharedBuffer::alloc(1);
|
SharedBuffer* buf = SharedBuffer::alloc(1);
|
||||||
|
@ -582,20 +578,4 @@ String8& String8::appendPath(const char* name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String8& String8::convertToResPath()
|
|
||||||
{
|
|
||||||
#if OS_PATH_SEPARATOR != RES_PATH_SEPARATOR
|
|
||||||
size_t len = length();
|
|
||||||
if (len > 0) {
|
|
||||||
char * buf = lockBuffer(len);
|
|
||||||
for (char * end = buf + len; buf < end; ++buf) {
|
|
||||||
if (*buf == OS_PATH_SEPARATOR)
|
|
||||||
*buf = RES_PATH_SEPARATOR;
|
|
||||||
}
|
|
||||||
unlockBuffer(len);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}; // namespace android
|
}; // namespace android
|
||||||
|
|
|
@ -82,9 +82,6 @@ std::vector<std::function<void(FuzzedDataProvider*, android::String8*, android::
|
||||||
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
|
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
|
||||||
str1->getPathDir();
|
str1->getPathDir();
|
||||||
},
|
},
|
||||||
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
|
|
||||||
str1->convertToResPath();
|
|
||||||
},
|
|
||||||
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
|
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
|
||||||
std::shared_ptr<android::String8> path_out_str =
|
std::shared_ptr<android::String8> path_out_str =
|
||||||
std::make_shared<android::String8>();
|
std::make_shared<android::String8>();
|
||||||
|
|
|
@ -724,9 +724,6 @@
|
||||||
{
|
{
|
||||||
"name" : "_ZN7android7String813appendFormatVEPKcSt9__va_list"
|
"name" : "_ZN7android7String813appendFormatVEPKcSt9__va_list"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name" : "_ZN7android7String816convertToResPathEv"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name" : "_ZN7android7String85clearEv"
|
"name" : "_ZN7android7String85clearEv"
|
||||||
},
|
},
|
||||||
|
@ -6927,19 +6924,6 @@
|
||||||
"return_type" : "_ZTIi",
|
"return_type" : "_ZTIi",
|
||||||
"source_file" : "system/core/libutils/include/utils/String8.h"
|
"source_file" : "system/core/libutils/include/utils/String8.h"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"function_name" : "android::String8::convertToResPath",
|
|
||||||
"linker_set_key" : "_ZN7android7String816convertToResPathEv",
|
|
||||||
"parameters" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"is_this_ptr" : true,
|
|
||||||
"referenced_type" : "_ZTIPN7android7String8E"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"return_type" : "_ZTIRN7android7String8E",
|
|
||||||
"source_file" : "system/core/libutils/include/utils/String8.h"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"function_name" : "android::String8::clear",
|
"function_name" : "android::String8::clear",
|
||||||
"linker_set_key" : "_ZN7android7String85clearEv",
|
"linker_set_key" : "_ZN7android7String85clearEv",
|
||||||
|
|
|
@ -724,9 +724,6 @@
|
||||||
{
|
{
|
||||||
"name" : "_ZN7android7String813appendFormatVEPKcSt9__va_list"
|
"name" : "_ZN7android7String813appendFormatVEPKcSt9__va_list"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name" : "_ZN7android7String816convertToResPathEv"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name" : "_ZN7android7String85clearEv"
|
"name" : "_ZN7android7String85clearEv"
|
||||||
},
|
},
|
||||||
|
@ -6923,19 +6920,6 @@
|
||||||
"return_type" : "_ZTIi",
|
"return_type" : "_ZTIi",
|
||||||
"source_file" : "system/core/libutils/include/utils/String8.h"
|
"source_file" : "system/core/libutils/include/utils/String8.h"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"function_name" : "android::String8::convertToResPath",
|
|
||||||
"linker_set_key" : "_ZN7android7String816convertToResPathEv",
|
|
||||||
"parameters" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"is_this_ptr" : true,
|
|
||||||
"referenced_type" : "_ZTIPN7android7String8E"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"return_type" : "_ZTIRN7android7String8E",
|
|
||||||
"source_file" : "system/core/libutils/include/utils/String8.h"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"function_name" : "android::String8::clear",
|
"function_name" : "android::String8::clear",
|
||||||
"linker_set_key" : "_ZN7android7String85clearEv",
|
"linker_set_key" : "_ZN7android7String85clearEv",
|
||||||
|
|
|
@ -200,15 +200,6 @@ public:
|
||||||
{ String8 p(*this); p.appendPath(leaf); return p; }
|
{ String8 p(*this); p.appendPath(leaf); return p; }
|
||||||
String8 appendPathCopy(const String8& leaf) const { return appendPathCopy(leaf.c_str()); }
|
String8 appendPathCopy(const String8& leaf) const { return appendPathCopy(leaf.c_str()); }
|
||||||
|
|
||||||
/*
|
|
||||||
* Converts all separators in this string to /, the default path separator.
|
|
||||||
*
|
|
||||||
* If the default OS separator is backslash, this converts all
|
|
||||||
* backslashes to slashes, in-place. Otherwise it does nothing.
|
|
||||||
* Returns self.
|
|
||||||
*/
|
|
||||||
String8& convertToResPath();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t real_append(const char* other, size_t numChars);
|
status_t real_append(const char* other, size_t numChars);
|
||||||
char* find_extension(void) const;
|
char* find_extension(void) const;
|
||||||
|
|
Loading…
Reference in New Issue