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
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user