Skip to content

Commit

Permalink
Update layer_settings_manager.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
vrepetsky authored and ziga-lunarg committed Sep 30, 2024
1 parent 1a35a3e commit 0a786ee
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/layer/layer_settings_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,18 @@
#include <algorithm>

#if defined(__ANDROID__)
/*
/*
* Use the __system_property_read_callback API that appeared in
* Android API level 26. If not avaible use the old __system_property_get function.
*/

// Weak function declaration, used only when not decalered in the Android headers
void __system_property_read_callback(const prop_info* info,
void (*callback)(void* cookie,
const char* name,
const char* value,
uint32_t serial),
void* cookie) __attribute__((weak));
void __system_property_read_callback(const prop_info *info,
void (*callback)(void *cookie, const char *name, const char *value, uint32_t serial),
void *cookie) __attribute__((weak));
static std::string GetAndroidProperty(const char *name) {
std::string output;
if(__system_property_read_callback != nullptr) {
if (__system_property_read_callback != nullptr) {
const prop_info *pi = __system_property_find(name);
if (pi) {
__system_property_read_callback(
Expand Down

0 comments on commit 0a786ee

Please sign in to comment.