Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4e35c68 authored by Anton Ivanov's avatar Anton Ivanov
Browse files

Harden construction sites of android::StrongPointer in frameworks/native

Test: presubmit
Flag: EXEMPT refactor
Bug: 393217449
Change-Id: I25857739af659a52d2e33fc0e05799959f4024ab
parent b1fd1868
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ bool GLHelper::createWindowSurface(uint32_t w, uint32_t h,
    status_t err;

    if (mSurfaceComposerClient == nullptr) {
        mSurfaceComposerClient = new SurfaceComposerClient;
        mSurfaceComposerClient = sp<SurfaceComposerClient>::make();
    }
    err = mSurfaceComposerClient->initCheck();
    if (err != NO_ERROR) {
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ public:
protected:
    void SetUp() {
        mComposer = ComposerService::getComposerService();
        mClient = new SurfaceComposerClient();
        mClient = sp<SurfaceComposerClient>::make();
        const auto ids = SurfaceComposerClient::getPhysicalDisplayIds();
        ASSERT_FALSE(ids.empty());
        // display 0 is picked as this test is not much display depedent
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ static constexpr uint32_t INVALID_MASK = 0x10;
class DisplayedContentSamplingTest : public ::testing::Test {
protected:
    void SetUp() {
        mComposerClient = new SurfaceComposerClient;
        mComposerClient = sp<SurfaceComposerClient>::make();
        ASSERT_EQ(OK, mComposerClient->initCheck());
        const auto ids = SurfaceComposerClient::getPhysicalDisplayIds();
        ASSERT_FALSE(ids.empty());
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ public:
    InputSurfacesTest() { ProcessState::self()->startThreadPool(); }

    void SetUp() {
        mComposerClient = new SurfaceComposerClient;
        mComposerClient = sp<SurfaceComposerClient>::make();
        ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
        const auto ids = SurfaceComposerClient::getPhysicalDisplayIds();
        ASSERT_FALSE(ids.empty());
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ void GLTest::SetUp() {
    }

    if (mDisplaySecs > 0) {
        mComposerClient = new SurfaceComposerClient;
        mComposerClient = sp<SurfaceComposerClient>::make();
        ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());

        mSurfaceControl = mComposerClient->createSurface(
Loading