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

Commit 42a6b622 authored by Shuangxi Xiang's avatar Shuangxi Xiang
Browse files

Remove redundant local parameters in Client

The Android version upgrade modified the declaration of createLayer and mirrorLayer functions in SurfaceFlinger, removed multiple parameters of objects such as IBinder, and also modified the mirrorDisplay function in Client, causing their local variables sp<IBinder> handle to be redundant.

Signed-off-by:
Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com>

Change-Id: Ifa8db1993fa46209a9d935c9ff588d2d0dc4c5f8
parent 33a6e89a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ binder::Status Client::createSurface(const std::string& name, int32_t flags,
                                     const sp<IBinder>& parent, const gui::LayerMetadata& metadata,
                                     gui::CreateSurfaceResult* outResult) {
    // We rely on createLayer to check permissions.
    sp<IBinder> handle;
    LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this), name.c_str(),
                           static_cast<uint32_t>(flags), std::move(metadata));
    args.parentHandle = parent;
@@ -101,7 +100,6 @@ binder::Status Client::getLayerFrameStats(const sp<IBinder>& handle, gui::FrameS

binder::Status Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle,
                                     gui::CreateSurfaceResult* outResult) {
    sp<IBinder> handle;
    LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this), "MirrorRoot",
                           0 /* flags */, gui::LayerMetadata());
    status_t status = mFlinger->mirrorLayer(args, mirrorFromHandle, *outResult);
@@ -109,7 +107,6 @@ binder::Status Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle,
}

binder::Status Client::mirrorDisplay(int64_t displayId, gui::CreateSurfaceResult* outResult) {
    sp<IBinder> handle;
    LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this),
                           "MirrorRoot-" + std::to_string(displayId), 0 /* flags */,
                           gui::LayerMetadata());