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

Commit ee33b9fc authored by Steven Moreland's avatar Steven Moreland
Browse files

InputWindow: use read/writeStrongBinder

Still storing binder locally as a weak binder, but the plan is to remove
read/writeWeakBinder APIs. This is because weak binders can't be
promoted unless there is already a strong binder in a given process.

Bug: 137785053
Test: atest libgui_tests libinput_tests
Before and after:
libgui_test: Passed: 202, Failed: 1, Ignored: 0, Assumption Failed: 0
libinput_tests: Passed: 74, Failed: 0, Ignored: 0, Assumption Failed: 0

The ToT failure is:
[133/203] SurfaceTest#GetHdrSupport: FAILED (6ms)

Change-Id: I4e952672885a035174152286c529d82f55d48326
parent fcc8248c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ status_t InputWindowInfo::write(Parcel& output) const {
    applicationInfo.write(output);
    output.write(touchableRegion);
    output.writeBool(replaceTouchableRegionWithCrop);
    output.writeWeakBinder(touchableRegionCropHandle);
    output.writeStrongBinder(touchableRegionCropHandle.promote());
    return OK;
}

@@ -142,7 +142,7 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) {
    ret.applicationInfo = InputApplicationInfo::read(from);
    from.read(ret.touchableRegion);
    ret.replaceTouchableRegionWithCrop = from.readBool();
    ret.touchableRegionCropHandle = from.readWeakBinder();
    ret.touchableRegionCropHandle = from.readStrongBinder();

    return ret;
}