Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3433a688 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

LGEStarRIL: Modify p999 exclusion logic

The p990 code also applies to the p920 (which has the same Infineon
modem implementation), so check for !p999 instead of p990

Change-Id: I3825aabde9baa6ee3d967d51da2b7e1465c0b1b3
parent a3653d22
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -893,15 +893,15 @@ public class LGEStarRIL extends RIL implements CommandsInterface {
        String response;
        SimpleDateFormat dateFormatter;
        SimpleDateFormat dateParser;
        boolean isP990 = SystemProperties.get("ro.build.product").equals("p990");
        boolean isIfx = !SystemProperties.get("ro.build.product").equals("p999");

        num = p.readInt(); // TZ diff in quarter-hours

        /* Get the actual date string */
        parceldata = p.readString();

        /* P990 needs some additional hax... */
        if (isP990) {
        /* Infineon modems need some additional hax... */
        if (isIfx) {
            /* Store DST before cropping */
            parcelextra = parceldata.substring(parceldata.lastIndexOf(",")+1);
            if (parcelextra != null) dst = Integer.parseInt(parcelextra);
@@ -915,8 +915,8 @@ public class LGEStarRIL extends RIL implements CommandsInterface {
            dateFormatter = new SimpleDateFormat("yy/MM/dd,HH:mm:ss");
            dateParser = new SimpleDateFormat("yy/MM/dd,HH:mm:ss");

            /* P990 delivers localtime, convert to UTC */
            if (isP990) {
            /* Ifx delivers localtime, convert to UTC */
            if (isIfx) {
                /* Directly calculate UTC time using DST Offset */
                long when = dateParser.parse(parceldata).getTime() - offset;
                Date d = new Date(when);
@@ -932,7 +932,7 @@ public class LGEStarRIL extends RIL implements CommandsInterface {

        /* Append the timezone */
        response = response + ((num < 0) ? "" : "+") + num;
        if (isP990) {
        if (isIfx) {
            /* Add DST */
            response = response + "," + dst;
        }