Loading cmds/bootanimation/BootAnimation.cpp +13 −3 Original line number Diff line number Diff line Loading @@ -1425,12 +1425,17 @@ void BootAnimation::drawTexturedQuad(float xStart, float yStart, float width, fl void BootAnimation::initDynamicColors() { for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { parseColorDecimalString( android::base::GetProperty("persist.bootanim.color" + std::to_string(i + 1), ""), const auto syspropName = "persist.bootanim.color" + std::to_string(i + 1); const auto syspropValue = android::base::GetProperty(syspropName, ""); if (syspropValue != "") { SLOGI("Loaded dynamic color: %s -> %s", syspropName.c_str(), syspropValue.c_str()); mDynamicColorsApplied = true; } parseColorDecimalString(syspropValue, mAnimation->endColors[i], mAnimation->startColors[i]); } glUseProgram(mImageShader); SLOGI("[BootAnimation] Dynamically coloring boot animation."); SLOGI("Dynamically coloring boot animation. Sysprops loaded? %i", mDynamicColorsApplied); for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { float *startColor = mAnimation->startColors[i]; float *endColor = mAnimation->endColors[i]; Loading Loading @@ -1465,6 +1470,11 @@ bool BootAnimation::playAnimation(const Animation& animation) { continue; //to next part } if (animation.dynamicColoringEnabled && part.useDynamicColoring && !mDynamicColorsApplied) { SLOGD("Trying to load dynamic color sysprops."); initDynamicColors(); } // process the part not only while the count allows but also if already fading for (int r=0 ; !part.count || r<part.count || fadedFramesCount > 0 ; r++) { if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break; Loading cmds/bootanimation/BootAnimation.h +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ private: bool mTimeIsAccurate; bool mTimeFormat12Hour; bool mShuttingDown; bool mDynamicColorsApplied = false; String8 mZipFileName; SortedVector<String8> mLoadedFiles; sp<TimeCheckThread> mTimeCheckThread = nullptr; Loading Loading
cmds/bootanimation/BootAnimation.cpp +13 −3 Original line number Diff line number Diff line Loading @@ -1425,12 +1425,17 @@ void BootAnimation::drawTexturedQuad(float xStart, float yStart, float width, fl void BootAnimation::initDynamicColors() { for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { parseColorDecimalString( android::base::GetProperty("persist.bootanim.color" + std::to_string(i + 1), ""), const auto syspropName = "persist.bootanim.color" + std::to_string(i + 1); const auto syspropValue = android::base::GetProperty(syspropName, ""); if (syspropValue != "") { SLOGI("Loaded dynamic color: %s -> %s", syspropName.c_str(), syspropValue.c_str()); mDynamicColorsApplied = true; } parseColorDecimalString(syspropValue, mAnimation->endColors[i], mAnimation->startColors[i]); } glUseProgram(mImageShader); SLOGI("[BootAnimation] Dynamically coloring boot animation."); SLOGI("Dynamically coloring boot animation. Sysprops loaded? %i", mDynamicColorsApplied); for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { float *startColor = mAnimation->startColors[i]; float *endColor = mAnimation->endColors[i]; Loading Loading @@ -1465,6 +1470,11 @@ bool BootAnimation::playAnimation(const Animation& animation) { continue; //to next part } if (animation.dynamicColoringEnabled && part.useDynamicColoring && !mDynamicColorsApplied) { SLOGD("Trying to load dynamic color sysprops."); initDynamicColors(); } // process the part not only while the count allows but also if already fading for (int r=0 ; !part.count || r<part.count || fadedFramesCount > 0 ; r++) { if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break; Loading
cmds/bootanimation/BootAnimation.h +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ private: bool mTimeIsAccurate; bool mTimeFormat12Hour; bool mShuttingDown; bool mDynamicColorsApplied = false; String8 mZipFileName; SortedVector<String8> mLoadedFiles; sp<TimeCheckThread> mTimeCheckThread = nullptr; Loading