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
This commit is contained in:
parent
e416f70786
commit
a904bb9522
2 changed files with 6 additions and 3 deletions
|
@ -494,9 +494,9 @@ void SurfaceFlinger::bootFinished()
|
|||
|
||||
// wait patiently for the window manager death
|
||||
const String16 name("window");
|
||||
sp<IBinder> window(defaultServiceManager()->getService(name));
|
||||
if (window != 0) {
|
||||
window->linkToDeath(static_cast<IBinder::DeathRecipient*>(this));
|
||||
mWindowManager = defaultServiceManager()->getService(name);
|
||||
if (mWindowManager != 0) {
|
||||
mWindowManager->linkToDeath(static_cast<IBinder::DeathRecipient*>(this));
|
||||
}
|
||||
|
||||
if (mVrFlinger) {
|
||||
|
|
|
@ -892,6 +892,9 @@ private:
|
|||
// either AID_GRAPHICS or AID_SYSTEM.
|
||||
status_t CheckTransactCodeCredentials(uint32_t code);
|
||||
|
||||
// to linkToDeath
|
||||
sp<IBinder> mWindowManager;
|
||||
|
||||
std::unique_ptr<dvr::VrFlinger> mVrFlinger;
|
||||
std::atomic<bool> mVrFlingerRequestsDisplay;
|
||||
static bool useVrFlinger;
|
||||
|
|
Loading…
Reference in a new issue