Add utility to identify lean targets
This utility reads ro.lean system property and returns a 1 if the property is set to true and returns 0 otherwise. Change-Id: I52a8396ee085d44b90d8416131f27b0b1a46575e CRs-fixed: 801990
This commit is contained in:
parent
c9b3856769
commit
7d367d0e62
2 changed files with 19 additions and 0 deletions
|
@ -244,3 +244,17 @@ detected:
|
|||
LOC_LOGD("HAL: %s returned %d", __FUNCTION__, gTarget);
|
||||
return gTarget;
|
||||
}
|
||||
|
||||
/*Reads the property ro.lean to identify if this is a lean target
|
||||
Returns:
|
||||
0 if not a lean and mean target
|
||||
1 if this is a lean and mean target
|
||||
*/
|
||||
int loc_identify_lean_target()
|
||||
{
|
||||
int ret = 0;
|
||||
char lean_target[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.lean", lean_target, "");
|
||||
LOC_LOGD("%s:%d]: lean target: %s\n", __func__, __LINE__, lean_target);
|
||||
return !(strncmp(lean_target, "true", PROPERTY_VALUE_MAX));
|
||||
}
|
||||
|
|
|
@ -52,6 +52,11 @@ void loc_get_target_baseband(char *baseband, int array_length);
|
|||
/*The character array passed to this function should have length
|
||||
of atleast PROPERTY_VALUE_MAX*/
|
||||
void loc_get_platform_name(char *platform_name, int array_length);
|
||||
/*Reads the property ro.lean to identify if this is a lean target
|
||||
Returns:
|
||||
0 if not a lean and mean target
|
||||
1 if this is a lean and mean target*/
|
||||
int loc_identify_lean_target();
|
||||
|
||||
/* Please remember to update 'target_name' in loc_log.cpp,
|
||||
if do any changes to this enum. */
|
||||
|
|
Loading…
Reference in a new issue