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

Commit 43198cf7 authored by Jeevaka Badrappan's avatar Jeevaka Badrappan Committed by Shuo Gao
Browse files

Telephony: Fix issue with fdn deletion



Deletion of FDN contact with name having the "=" character
fails.

If there is a contact with "=" as part of the name, then split
will result in 3strings instead of 2(key and value).

For eg: Contact name: "="

Result with current code: [string.split("=")]
string[0] = tag
string[1] = '
string[2] = '.

Expected result:
string[0] = tag (key)
string[1] = '=' (value)

If split function with 2 arguments variation is used,
this issue will be solved. Example: string.split("=", 2)

Change-Id: I6c2d6152f9b034cae9739cd96c2fe799784dc5be
Author: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: default avatarJeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: default avatarArun Ravindran <arun.ravindran@intel.com>
Signed-off-by: default avatarShuo Gao <shuo.gao@intel.com>
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
Signed-off-by: default avatarJack Ren <jack.ren@intel.com>
Author-tracking-BZ: 10805
parent 106de004
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -207,12 +207,7 @@ public class IccProvider extends ContentProvider {
            String param = tokens[n];
            if (DBG) log("parsing '" + param + "'");

            String[] pair = param.split("=");

            if (pair.length != 2) {
                Rlog.e(TAG, "resolve: bad whereClause parameter: " + param);
                continue;
            }
            String[] pair = param.split("=", 2);

            String key = pair[0].trim();
            String val = pair[1].trim();