From a904bb9522b97c19acab9b67eb043549985cf857 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 2 Jul 2019 17:37:23 -0700 Subject: Hold onto linked binder. unlinkToDeath is no longer required, (this change in behavior is to avoid leaks) so holding onto window manager here (still calling unlinkToDeath to avoid a log, but may for instance remove all unlinkToDeath calls in the future). Bug: 134576445 Test: boot Change-Id: I78259964b564d87c4bb9be254ee46d3ce04db5ad --- services/surfaceflinger/SurfaceFlinger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 78d751a212..629c6cafe6 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -494,9 +494,9 @@ void SurfaceFlinger::bootFinished() // wait patiently for the window manager death const String16 name("window"); - sp window(defaultServiceManager()->getService(name)); - if (window != 0) { - window->linkToDeath(static_cast(this)); + mWindowManager = defaultServiceManager()->getService(name); + if (mWindowManager != 0) { + mWindowManager->linkToDeath(static_cast(this)); } if (mVrFlinger) { -- cgit v1.2.3-59-g8ed1b