Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 264fa28f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix the problem of slow exit of boot animation" am: 9a0581c0 am:...

Merge "Fix the problem of slow exit of boot animation" am: 9a0581c0 am: f6ecaaf5 am: fd453a4a am: 9b6e5783 am: e06a69a9

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



Change-Id: I2eeace8573da620323ddef204d5dbfd77e376961
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6405d811 e06a69a9
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ static const char PROGRESS_PROP_NAME[] = "service.bootanim.progress";
static const char DISPLAYS_PROP_NAME[] = "persist.service.bootanim.displays";
static const char CLOCK_ENABLED_PROP_NAME[] = "persist.sys.bootanim.clock.enabled";
static const int ANIM_ENTRY_NAME_MAX = ANIM_PATH_MAX + 1;
static const int MAX_CHECK_EXIT_INTERVAL_US = 50000;
static constexpr size_t TEXT_POS_LEN_MAX = 16;
static const int DYNAMIC_COLOR_COUNT = 4;
static const char U_TEXTURE[] = "uTexture";
@@ -1678,7 +1679,17 @@ bool BootAnimation::playAnimation(const Animation& animation) {
                checkExit();
            }

            usleep(part.pause * ns2us(frameDuration));
            int pauseDuration = part.pause * ns2us(frameDuration);
            while(pauseDuration > 0 && !exitPending()){
                if (pauseDuration > MAX_CHECK_EXIT_INTERVAL_US) {
                    usleep(MAX_CHECK_EXIT_INTERVAL_US);
                    pauseDuration -= MAX_CHECK_EXIT_INTERVAL_US;
                } else {
                    usleep(pauseDuration);
                    break;
                }
                checkExit();
            }

            if (exitPending() && !part.count && mCurrentInset >= mTargetInset &&
                !part.hasFadingPhase()) {