summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Anton Ivanov <aii@google.com> 2025-02-13 22:57:24 -0800
committer Anton Ivanov <aii@google.com> 2025-02-17 17:52:19 -0800
commit81793808b9347a52dd979e4b3d5d9d10fc8c4915 (patch)
tree51529ad19b47e374dcfe15cab26f910a6c4f5319 /libs/gui/ConsumerBase.cpp
parentf6dc8535293c1614e9c08e6416fe67a3514ed0e8 (diff)
Harden construction sites of android::StrongPointer.
Bug: 393217449 Test: presubmit Flag: EXEMPT_refactor Change-Id: Icf703aed608531e9b302b299481af00a52074731
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
-rw-r--r--libs/gui/ConsumerBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index 3ad0e529a5..62508de052 100644
--- a/libs/gui/ConsumerBase.cpp
+++ b/libs/gui/ConsumerBase.cpp
@@ -110,7 +110,7 @@ void ConsumerBase::initialize(bool controlledByApp) {
// dropping to 0 at the end of the ctor. Since all we need is a wp<...>
// that's what we create.
wp<ConsumerListener> listener = static_cast<ConsumerListener*>(this);
- sp<IConsumerListener> proxy = new BufferQueue::ProxyConsumerListener(listener);
+ sp<IConsumerListener> proxy = sp<BufferQueue::ProxyConsumerListener>::make(listener);
status_t err = mConsumer->consumerConnect(proxy, controlledByApp);
if (err != NO_ERROR) {