Remove undefined behavior in getDisplayDecorationSupport
I3b46bae068ac3d482881dac96972a40e46581d34 introduced a bug when converting between two different versions of DisplayDecorationSupport. We attempt to set the member fields of an std::optional object before it has a value. Use emplace to insert a value into the object. Unfortunately, fixing this reveals b/241278870, which is a serious regression. On the other hand, the current checked in code results in undefined behavior, so prevent that. Once b/241278870 is fixed, it will be simple to remove the check for 'false'. Bug: 241277093 Test: manual Change-Id: I53a56b792d99bb72d49d32b5d8f071353dae1b41
Loading
Please register or sign in to comment