diff options
author | Harikrishnan Hariharan <hahariha@codeaurora.org> | 2019-10-03 23:32:30 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-10-10 23:01:26 -0700 |
commit | 8e7733ba7fa7e307213af81e3447006d8a7a8b1f (patch) | |
tree | 5537db0d43692abd74f3fb3c462545b594ea1340 /utils/loc_target.cpp | |
parent | 3d053a57fcb40b90a2be2403fc50ffe671e6befb (diff) | |
download | gps-8e7733ba7fa7e307213af81e3447006d8a7a8b1f.tar.gz |
Disable few process launch in loc_launcher for low ram targets
Use ro.config.low_ram property to identify low ram targets and
disable the process in izat.conf whose property value
LOW_RAM_TARGETS is set to DISABLED.
Change-Id: Idb8b0b91c4ed127b4fa58c41683f9720252dff84
CRs-Fixed: 2542145
Diffstat (limited to 'utils/loc_target.cpp')
-rw-r--r-- | utils/loc_target.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index f6fd728..1cab7b8 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -130,6 +130,21 @@ void loc_get_auto_platform_name(char *platform_name, int array_length) } } +/*Reads the property ro.config.low_ram to identify if this is a low ram target + Returns: + 0 if not a low ram target + 1 if this is a low ram target +*/ +int loc_identify_low_ram_target() +{ + int ret = 0; + char low_ram_target[PROPERTY_VALUE_MAX]; + property_get("ro.config.low_ram", low_ram_target, ""); + LOC_LOGd("low ram target: %s\n", low_ram_target); + return !(strncmp(low_ram_target, "true", PROPERTY_VALUE_MAX)); +} + + unsigned int loc_get_target(void) { if (gTarget != (unsigned int)-1) |