summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author Anton Ivanov <aii@google.com> 2025-02-24 01:13:58 -0800
committer Anton Ivanov <aii@google.com> 2025-02-26 17:33:20 -0800
commita4c448d5f17cbf3e24755dabb9b06509960274ec (patch)
treef519ef5e7c9badd8039c07a19327ab85b9353d7c /cmds/bootanimation/BootAnimation.cpp
parent9848646dac597100e682ba81094391065c68a2a6 (diff)
Harden construction sites of android::Surface.
Since this type is inteded to be managed as a StrongPointer, ensure that is always constructed as such. Bug: 393217449 Test: presubmit Flag: EXEMPT_refactor Change-Id: Ia74493743653a9e41384cfb4c384ac30bef1e907
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 844e52c3ecf2..b0070c5faa36 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -207,7 +207,7 @@ BootAnimation::BootAnimation(sp<Callbacks> callbacks)
: Thread(false), mLooper(new Looper(false)), mClockEnabled(true), mTimeIsAccurate(false),
mTimeFormat12Hour(false), mTimeCheckThread(nullptr), mCallbacks(callbacks) {
ATRACE_CALL();
- mSession = new SurfaceComposerClient();
+ mSession = sp<SurfaceComposerClient>::make();
std::string powerCtl = android::base::GetProperty("sys.powerctl", "");
if (powerCtl.empty()) {