Merge "libhwui: AnimatedImageThread fix 'UAF' nits" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-30 22:38:00 +00:00
committed by Android (Google) Code Review

View File

@@ -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() {