aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Stefani <luca.stefani.ge1@gmail.com>2016-08-26 04:52:48 -0700
committerTrafalgar-Square <schneller.demian@gmail.com>2016-08-28 15:27:31 +0200
commit02760ec6bb8536f348290a1b4528185969177eb6 (patch)
tree21e46dca88ddd728541f7f4fbd00f93fdd57ab8c
parentfa7f3843b3656f973dbc114b784e25ebb022e634 (diff)
thea: init: Kill ISMATCHHEADn7.0
* Let's use c++ std::string Change-Id: If2fc2c235e227008984308ea37c24f32876d66c8
-rw-r--r--init/init_thea.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/init/init_thea.cpp b/init/init_thea.cpp
index 06c10d4..5b4c288 100644
--- a/init/init_thea.cpp
+++ b/init/init_thea.cpp
@@ -35,8 +35,6 @@
#include "log.h"
#include "util.h"
-#define ISMATCH(a,b) (!strncmp(a,b,PROP_VALUE_MAX))
-
void gsm_properties(bool msim);
void cdma_properties(const char *cdma_sub, const char *network);
@@ -45,14 +43,14 @@ void vendor_load_properties()
int rc;
std::string platform = property_get("ro.board.platform");
- if (!ISMATCH(platform.c_str(), ANDROID_TARGET))
+ if (platform != ANDROID_TARGET)
return;
std::string radio = property_get("ro.boot.radio");
property_set("ro.product.model", "Moto G 2014 LTE");
- if (ISMATCH(radio.c_str(), "0x3")) {
+ if (radio == "0x3") {
/* XT1072 */
gsm_properties(false);
property_set("ro.build.description", "thea_retgb-user 6.0 MPB24.65-34 31 release-keys");
@@ -60,7 +58,7 @@ void vendor_load_properties()
property_set("ro.build.product", "thea");
property_set("ro.mot.build.customerid", "retgball");
property_set("ro.product.device", "thea");
- } else if (ISMATCH(radio.c_str(), "0xE")) {
+ } else if (radio == "0xE") {
/* XT1077 */
cdma_properties("0", "10");
property_set("ro.build.description", "thea_retcn_ds-user 6.0 MPB24.65-34 31 release-keys");
@@ -68,7 +66,7 @@ void vendor_load_properties()
property_set("ro.build.product", "thea_ds");
property_set("ro.mot.build.customerid", "retcn");
property_set("ro.product.device", "thea_ds");
- } else if (ISMATCH(radio.c_str(), "0xC")) {
+ } else if (radio == "0xC") {
/* XT1078 */
gsm_properties(true);
property_set("ro.build.description", "thea_retbr_ds-user 6.0 MPB24.65-34 31 release-keys");
@@ -76,7 +74,7 @@ void vendor_load_properties()
property_set("ro.build.product", "thea_umtsds");
property_set("ro.mot.build.customerid", "retbr");
property_set("ro.product.device", "thea_umtsds");
- } else if (ISMATCH(radio.c_str(), "0xD")) {
+ } else if (radio == "0xD") {
/* XT1079 */
cdma_properties("0", "20");
property_set("ro.build.description", "thea_retcn_ds-user 6.0 MPB24.65-34 31 release-keys");