Support for showing percent progress in boot animation.
Bug: 175686819
Test: boot with manual changes updating the progress
Change-Id: I2d936e3391f56796308c90deb39ecacc58797721
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 4699cfe..07432a2 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -98,11 +98,13 @@
int fps;
int width;
int height;
+ bool progressEnabled;
Vector<Part> parts;
String8 audioConf;
String8 fileName;
ZipFileRO* zip;
Font clockFont;
+ Font progressFont;
};
// All callbacks will be called from this class's internal thread.
@@ -168,6 +170,7 @@
bool movie();
void drawText(const char* str, const Font& font, bool bold, int* x, int* y);
void drawClock(const Font& font, const int xPos, const int yPos);
+ void drawProgress(int percent, const Font& font, const int xPos, const int yPos);
void fadeFrame(int frameLeft, int frameBottom, int frameWidth, int frameHeight,
const Animation::Part& part, int fadedFramesCount);
bool validClock(const Animation::Part& part);