diff options
| author | Michael Bestas <mikeioannina@cyanogenmod.org> | 2016-02-21 02:57:44 +0200 |
|---|---|---|
| committer | El Dainosor <eldainosor@gmail.com> | 2017-07-07 23:25:32 -0300 |
| commit | 70f0570fbee0a5bfe35a2fbb1d0628110c7afcbe (patch) | |
| tree | 1410e2668c973a6b4d66821efc36b8ae9c332fab | |
| parent | 5dc6955c01e0d09eff855d89e24996b5d04ea1b4 (diff) | |
surnia: Allow vendor init to override props
Change-Id: Ic7c4d86616bfe33b9668b5b54d119d0380f4660c
| -rw-r--r-- | init/init_surnia.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/init/init_surnia.cpp b/init/init_surnia.cpp index bc68b62..22e44ed 100644 --- a/init/init_surnia.cpp +++ b/init/init_surnia.cpp @@ -29,6 +29,8 @@ #include <stdlib.h> #include <stdio.h> +#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ +#include <sys/_system_properties.h> #include "vendor_init.h" #include "property_service.h" @@ -38,6 +40,17 @@ void gsm_properties(bool msim); void cdma_properties(); +void property_override(char const prop[], char const value[]) +{ + prop_info *pi; + + pi = (prop_info*) __system_property_find(prop); + if (pi) + __system_property_update(pi, value, strlen(value)); + else + __system_property_add(prop, strlen(prop), value, strlen(value)); +} + void vendor_load_properties() { std::string carrier; |
