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

Commit bcf12768 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Ignore case on apn type strings.

Found that if the type were not lowercase it wouldn't match.
That's silly.  Do case-insensitive compares.

bug:5525764
Change-Id: Ibfe6be6c34116e00931594ec317fe192e1756ade
parent 7a939077
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -181,9 +181,10 @@ public class ApnSetting {
    public boolean canHandleType(String type) {
        for (String t : types) {
            // DEFAULT handles all, and HIPRI is handled by DEFAULT
            if (t.equals(type) || t.equals(Phone.APN_TYPE_ALL) ||
                    (t.equals(Phone.APN_TYPE_DEFAULT) &&
                    type.equals(Phone.APN_TYPE_HIPRI))) {
            if (t.equalsIgnoreCase(type) ||
                    t.equalsIgnoreCase(Phone.APN_TYPE_ALL) ||
                    (t.equalsIgnoreCase(Phone.APN_TYPE_DEFAULT) &&
                    type.equalsIgnoreCase(Phone.APN_TYPE_HIPRI))) {
                return true;
            }
        }