summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-18 08:15:24 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-18 08:15:24 -0700
commit969e7ea620148cad0dc103b1df1516b2822ebe3a (patch)
treea6f89249430e2a00cde0e516623f7e32121dae34 /libs/gui/SurfaceControl.cpp
parent4b5277998b867b95bd340c09f0c137dc9738f006 (diff)
parent9045666047d55134c2e4f0108a88b5799653003e (diff)
Merge changes I60d42f38,I25857739 into main
* changes: Ensure Choreographer is held as sp<> in SurfaceControl. Harden construction sites of android::StrongPointer in frameworks/native
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 1eb9b87c3c..50877f8c56 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -194,7 +194,7 @@ const std::string& SurfaceControl::getName() const {
return mName;
}
-std::shared_ptr<Choreographer> SurfaceControl::getChoreographer() {
+sp<Choreographer> SurfaceControl::getChoreographer() {
if (mChoreographer) {
return mChoreographer;
}
@@ -203,7 +203,7 @@ std::shared_ptr<Choreographer> SurfaceControl::getChoreographer() {
ALOGE("%s: No looper prepared for thread", __func__);
return nullptr;
}
- mChoreographer = std::make_shared<Choreographer>(looper, getHandle());
+ mChoreographer = sp<Choreographer>::make(looper, getHandle());
status_t result = mChoreographer->initialize();
if (result != OK) {
ALOGE("Failed to initialize choreographer");