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

Commit 14c461a4 authored by Steven Thomas's avatar Steven Thomas
Browse files

Fix client creation failure in vr_hwc

There's some code in vr_hwc to prevent multiple clients, but it was
slightly broken in that only the first attempt to create a client would
work. If you destroyed the client and then tried to create another one,
it would incorrectly fail.

This results in a "failed to create composer client" assertion crash in
surface flinger the second time a user runs a vr app that uses vr
flinger.

Bug: 74985350

Test: Enable vr flinger render path, enter vr, exit vr, enter vr,
confirmed no crash.

Change-Id: Id5de0063c1e4e0be5a06d0a59b59ae3b669480f8
parent f5c7aff3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -868,7 +868,7 @@ Return<void> VrHwc::createClient(createClient_cb hidl_cb) {

  Error status = Error::NONE;
  sp<VrComposerClient> client;
  if (client_ == nullptr) {
  if (!client_.promote().get()) {
    client = new VrComposerClient(*this);
  } else {
    ALOGE("Already have a client");