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

Commit c8dfab47 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "sf: avoid assumption remote binder is local" into rvc-dev am:...

Merge "sf: avoid assumption remote binder is local" into rvc-dev am: 51e304e1 am: 4809fecb am: 39c0d06b

Change-Id: I02b44684400f05a949de5af5519fa826a92e42be
parents 02928b0e 39c0d06b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -201,9 +201,10 @@ RegionSamplingThread::~RegionSamplingThread() {

void RegionSamplingThread::addListener(const Rect& samplingArea, const sp<IBinder>& stopLayerHandle,
                                       const sp<IRegionSamplingListener>& listener) {
    wp<Layer> stopLayer = stopLayerHandle != nullptr
            ? static_cast<Layer::Handle*>(stopLayerHandle.get())->owner
            : nullptr;
    wp<Layer> stopLayer;
    if (stopLayerHandle != nullptr && stopLayerHandle->localBinder() != nullptr) {
        stopLayer = static_cast<Layer::Handle*>(stopLayerHandle.get())->owner;
    }

    sp<IBinder> asBinder = IInterface::asBinder(listener);
    asBinder->linkToDeath(this);