From a4c448d5f17cbf3e24755dabb9b06509960274ec Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Mon, 24 Feb 2025 01:13:58 -0800 Subject: 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 --- cmds/bootanimation/BootAnimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') 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) : Thread(false), mLooper(new Looper(false)), mClockEnabled(true), mTimeIsAccurate(false), mTimeFormat12Hour(false), mTimeCheckThread(nullptr), mCallbacks(callbacks) { ATRACE_CALL(); - mSession = new SurfaceComposerClient(); + mSession = sp::make(); std::string powerCtl = android::base::GetProperty("sys.powerctl", ""); if (powerCtl.empty()) { -- cgit v1.2.3-59-g8ed1b