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

Commit 16d2ddd8 authored by Steven Moreland's avatar Steven Moreland
Browse files

libhwui: AnimatedImageThread fix 'UAF' nits

nits from UAF CL:
- we don't need to be careful about destroying this thread
- overly verbose return

Bug: 186468053
Test: N/A
Change-Id: I96b3c5b038529341381865cbd5784ac54ba2fc9e
parent cda49ca0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@ namespace android {
namespace uirenderer {

AnimatedImageThread& AnimatedImageThread::getInstance() {
    [[clang::no_destroy]] static sp<AnimatedImageThread> sInstance = []() {
    static sp<AnimatedImageThread> sInstance = []() {
        sp<AnimatedImageThread> thread = sp<AnimatedImageThread>::make();
        thread->start("AnimatedImageThread");
        return thread;
    }();
    return *sInstance.get();
    return *sInstance;
}

AnimatedImageThread::AnimatedImageThread() {