diff options
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 74ca41d0f9b4..4690f3386616 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -1137,7 +1137,7 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { if (!readFile(animation.zip, "desc.txt", desString)) { return false; } - char const* s = desString.string(); + char const* s = desString.c_str(); std::string dynamicColoringPartName = ""; bool postDynamicColoring = false; @@ -1146,7 +1146,7 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { const char* endl = strstr(s, "\n"); if (endl == nullptr) break; String8 line(s, endl - s); - const char* l = line.string(); + const char* l = line.c_str(); int fps = 0; int width = 0; int height = 0; @@ -1330,7 +1330,7 @@ bool BootAnimation::preloadZip(Animation& animation) { // If there is trimData present, override the positioning defaults. for (Animation::Part& part : animation.parts) { - const char* trimDataStr = part.trimData.string(); + const char* trimDataStr = part.trimData.c_str(); for (size_t frameIdx = 0; frameIdx < part.frames.size(); frameIdx++) { const char* endl = strstr(trimDataStr, "\n"); // No more trimData for this part. @@ -1338,7 +1338,7 @@ bool BootAnimation::preloadZip(Animation& animation) { break; } String8 line(trimDataStr, endl - trimDataStr); - const char* lineStr = line.string(); + const char* lineStr = line.c_str(); trimDataStr = ++endl; int width = 0, height = 0, x = 0, y = 0; if (sscanf(lineStr, "%dx%d+%d+%d", &width, &height, &x, &y) == 4) { @@ -1566,7 +1566,7 @@ bool BootAnimation::playAnimation(const Animation& animation) { 1.0f); ALOGD("Playing files = %s/%s, Requested repeat = %d, playUntilComplete = %s", - animation.fileName.string(), part.path.string(), part.count, + animation.fileName.c_str(), part.path.c_str(), part.count, part.playUntilComplete ? "true" : "false"); // For the last animation, if we have progress indicator from @@ -1787,17 +1787,17 @@ void BootAnimation::releaseAnimation(Animation* animation) const { BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn) { if (mLoadedFiles.indexOf(fn) >= 0) { SLOGE("File \"%s\" is already loaded. Cyclic ref is not allowed", - fn.string()); + fn.c_str()); return nullptr; } ZipFileRO *zip = ZipFileRO::open(fn); if (zip == nullptr) { SLOGE("Failed to open animation zip \"%s\": %s", - fn.string(), strerror(errno)); + fn.c_str(), strerror(errno)); return nullptr; } - ALOGD("%s is loaded successfully", fn.string()); + ALOGD("%s is loaded successfully", fn.c_str()); Animation *animation = new Animation; animation->fileName = fn; |