Merge "bootanimation: add empty lines parsing skip for desc.txt" am: 936f661025

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2331190

Change-Id: I4972699ba6015e84d4425730dbf304a9b6e19a73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongguang Chen
2022-12-07 21:35:37 +00:00
committed by Automerger Merge Worker

View File

@@ -1114,6 +1114,11 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) {
int nextReadPos; int nextReadPos;
if (strlen(l) == 0) {
s = ++endl;
continue;
}
int topLineNumbers = sscanf(l, "%d %d %d %d", &width, &height, &fps, &progress); int topLineNumbers = sscanf(l, "%d %d %d %d", &width, &height, &fps, &progress);
if (topLineNumbers == 3 || topLineNumbers == 4) { if (topLineNumbers == 3 || topLineNumbers == 4) {
// SLOGD("> w=%d, h=%d, fps=%d, progress=%d", width, height, fps, progress); // SLOGD("> w=%d, h=%d, fps=%d, progress=%d", width, height, fps, progress);