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

Skip to content
Commit 8d675649 authored by Snild Dolkow's avatar Snild Dolkow Committed by Dominik Laskowski
Browse files

Let missing DeviceProductInfo pass through AIDL

On the way between SurfaceFlinger and DisplayManager, there are two
conversions done between the old and new StaticDisplayInfo types.
Neither of these conversions were checking that the incoming optional
DeviceProductInfo did indeed have a value before reading it.

Dereferencing an empty optional is undefined behavior. In practice,
the converters read zeroes, causing the output to have info fields
with present-but-invalid content.

On devices that do not provide DeviceProductInfo, DisplayManager got
a model year of 0, making DisplayTest#testGetDeviceProductInfo fail.

Fixes: 291101831
Fixes: 283031260
Fixes: 286718808
Test: cts DisplayTest#testGetDeviceProductInfo
Change-Id: I118a1ce6459697ce471cdec75d156adad479c654
parent b7a9610d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment