From 42a6b622f3b71b27d0153ddab9aac9f829a78604 Mon Sep 17 00:00:00 2001 From: Shuangxi Xiang Date: Fri, 10 Jan 2025 03:57:14 -0800 Subject: 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 handle to be redundant. Signed-off-by: Shuangxi Xiang Change-Id: Ifa8db1993fa46209a9d935c9ff588d2d0dc4c5f8 --- services/surfaceflinger/Client.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'services/surfaceflinger/Client.cpp') diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp index abeb2a92eb..77bf1457c3 100644 --- a/services/surfaceflinger/Client.cpp +++ b/services/surfaceflinger/Client.cpp @@ -53,7 +53,6 @@ binder::Status Client::createSurface(const std::string& name, int32_t flags, const sp& parent, const gui::LayerMetadata& metadata, gui::CreateSurfaceResult* outResult) { // We rely on createLayer to check permissions. - sp handle; LayerCreationArgs args(mFlinger.get(), sp::fromExisting(this), name.c_str(), static_cast(flags), std::move(metadata)); args.parentHandle = parent; @@ -101,7 +100,6 @@ binder::Status Client::getLayerFrameStats(const sp& handle, gui::FrameS binder::Status Client::mirrorSurface(const sp& mirrorFromHandle, gui::CreateSurfaceResult* outResult) { - sp handle; LayerCreationArgs args(mFlinger.get(), sp::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& mirrorFromHandle, } binder::Status Client::mirrorDisplay(int64_t displayId, gui::CreateSurfaceResult* outResult) { - sp handle; LayerCreationArgs args(mFlinger.get(), sp::fromExisting(this), "MirrorRoot-" + std::to_string(displayId), 0 /* flags */, gui::LayerMetadata()); -- cgit v1.2.3-59-g8ed1b