From 8ed86598b8e5ee2ef1bf1f69e467489e620635e0 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Thu, 20 Feb 2025 11:52:50 -0800 Subject: Revert^2 "Harden construction sites of android::StrongPointer." This reverts commit f73db7a6242e297ead71df0d0d1fb3a8515245d3. Reason for revert: Scope restricted to sp<>::make which is a safe replacement for assignment from new. Bug: 393217449 Test: ChoreographerTests pass locally. Flag: EXEMPT_refactor Change-Id: I9a38c54c06cc64da099d282c05ccf20f40b70a72 --- libs/gui/LayerState.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index ebfc62f33f..43855dadcd 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -684,7 +684,7 @@ void layer_state_t::merge(const layer_state_t& other) { } if (other.what & eInputInfoChanged) { what |= eInputInfoChanged; - windowInfoHandle = new WindowInfoHandle(*other.windowInfoHandle); + windowInfoHandle = sp::make(*other.windowInfoHandle); } if (other.what & eBackgroundColorChanged) { what |= eBackgroundColorChanged; @@ -1001,13 +1001,13 @@ status_t BufferData::readFromParcel(const Parcel* input) { bool tmpBool = false; SAFE_PARCEL(input->readBool, &tmpBool); if (tmpBool) { - buffer = new GraphicBuffer(); + buffer = sp::make(); SAFE_PARCEL(input->read, *buffer); } SAFE_PARCEL(input->readBool, &tmpBool); if (tmpBool) { - acquireFence = new Fence(); + acquireFence = sp::make(); SAFE_PARCEL(input->read, *acquireFence); } -- cgit v1.2.3-59-g8ed1b