Commit graph

4 commits

Author SHA1 Message Date
bengris32
015d90baa5 libbase: Shim old StartsWith function prototype
* The str parameter StartsWith function in libbase got changed
  from std::string to std::string_view in later android versions [1].

* Create a shim that provides the older StartsWith function.

[1]: ef973cee17

Change-Id: I116a32a739d6fa34ecc0d1a4acf8b2e3756910ea
2023-10-03 08:31:35 +00:00
Sebastiano Barezzi
ca34347089
compat: Keep only one copy of clang-format style
* When --style=file is specified, clang-format will look for a
  .clang-format on file's parent dirs automatically

Change-Id: If94fe4915cd434b3f5901b8830cbdb90976ae4b7
2023-07-17 20:51:56 +02:00
Ivan Vecera
d67ae54f8e compat: Fix ABI issues
Several constructor shims are implemented incorrectly because
they completely ignore the fact that constructors have 'this-call'
calling convention and should pass 'this ptr' as the first argument [1]
as well as its return value, at least according ARM ABI [2].

Additionally android::SurfaceComposerClient::Transaction::apply(bool)
shim has void return value instead of status_t so the caller retrieves
random value.

[1] https://review.lineageos.org/c/LineageOS/android_device_xiaomi_sdm710-common/+/360011/comments/eb6600df_3e2fb434
[2] 617079d8a0/cppabi32/cppabi32.rst (L576)

Change-Id: I7b14b5d3ca6008c1e4b3f5fcbaece5021b3cbb82
Signed-off-by: Ivan Vecera <ivan@cera.cz>
2023-06-26 15:20:07 +02:00
Ethan Chen
e2f889da0b compat: Add shim for libbase LogMessage functions
Change-Id: I4d1db75e5407586c9b69d94803af0ef9a9a91037
2022-10-19 11:40:51 +02:00