android: support longer property names

Property names no longer have a maximum length in Android 26+,
support longer names to fix truncated property names.

Signed-off-by: Allen Ballway <ballway@google.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13043
Test: vendor.mesa.custom.border.colors.without.format is untruncated
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38453>
This commit is contained in:
Allen Ballway 2025-11-17 11:28:13 -08:00 committed by Marge Bot
parent 9a72696e02
commit bfee8d3a14

View file

@ -141,6 +141,16 @@ os_log_message(const char *message)
# include <ctype.h>
# include "c11/threads.h"
/**
* In Android 26+ there is no restriction on the length of the name for a
* property, replace the default max length with one large enough to support
* all property names.
*/
#if ANDROID_API_LEVEL >= 26
#undef PROPERTY_KEY_MAX
#define PROPERTY_KEY_MAX 128
#endif /* ANDROID_API_LEVEL >= 26 */
/**
* Get an option value from android's property system, as a fallback to
* getenv() (which is generally less useful on android due to processes