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

Commit da9de2d7 authored by Youming Ye's avatar Youming Ye Committed by Gerrit Code Review
Browse files

Merge "Fix property setting with failure"

parents a32f8987 67bbcea7
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -5604,7 +5604,7 @@ public class TelephonyManager {
        if (value == null) {
        if (value == null) {
            value = "";
            value = "";
        }
        }

        value.replace(',', ' ');
        if (prop != null) {
        if (prop != null) {
            p = prop.split(",");
            p = prop.split(",");
        }
        }
@@ -5630,7 +5630,13 @@ public class TelephonyManager {
            }
            }
        }
        }


        if (propVal.length() > SystemProperties.PROP_VALUE_MAX) {
        int propValLen = propVal.length();
        try {
            propValLen = propVal.getBytes("utf-8").length;
        } catch (java.io.UnsupportedEncodingException e) {
            Rlog.d(TAG, "setTelephonyProperty: utf-8 not supported");
        }
        if (propValLen > SystemProperties.PROP_VALUE_MAX) {
            Rlog.d(TAG, "setTelephonyProperty: property too long phoneId=" + phoneId +
            Rlog.d(TAG, "setTelephonyProperty: property too long phoneId=" + phoneId +
                    " property=" + property + " value: " + value + " propVal=" + propVal);
                    " property=" + property + " value: " + value + " propVal=" + propVal);
            return;
            return;