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
This commit is contained in:
Robert Greenwalt
2012-01-10 15:49:19 -08:00
parent 7a939077bd
commit bcf1276830

View File

@@ -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;
}
}