cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Eichel (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10043) navigator.connection.type gives "unknown" when connection type is actually known
Date Thu, 19 Nov 2015 15:51:11 GMT

     [ https://issues.apache.org/jira/browse/CB-10043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matthias Eichel updated CB-10043:
---------------------------------
    Affects Version/s:     (was: 1.1.0)

> navigator.connection.type gives "unknown" when connection type is actually known
> --------------------------------------------------------------------------------
>
>                 Key: CB-10043
>                 URL: https://issues.apache.org/jira/browse/CB-10043
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Network Information
>         Environment: Android
>            Reporter: Matthias Eichel
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> This bug affects release 1.1.0 of the network infomation plugin. Release 1.0.1 is not
affected.
> navigator.connection.type gives "unknown" as a result when connected via 3G. It probably
gives "unknown" as a result in other cases. 
> This bug, you can see easily, was introduced with commit 6550b937d0d437183984437deb452cbdd653ac18
of NetworkManager.java by SidFerreira's commit on 28 July ("Performance-related fix"). 
> The cause of the bug introduced is that line 247 misses a conversion of the subtypename
to lower case, so 
> {code}
> type = info.getSubtypeName(); 
> {code}
> should instead be 
> {code}
> type = info.getSubtypeName().toLowerCase(US);
> {code}
> to compare correctly.
> By the way, in line 243
> {code}
> else if (type.toLowerCase().equals(TYPE_ETHERNET)) {
> {code}
> toLowerCase() can be omitted because type is already in lower case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message