Skip to content

Commit

Permalink
fix: Fix an issue in the Android de-duplication code
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-oakes committed May 17, 2019
1 parent d90bbd8 commit de12dd5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ String getEffectiveConnectionType(NetworkInfo networkInfo) {
void updateConnectivity(String connectionType, String cellularGeneration) {
// It is possible to get multiple broadcasts for the same connectivity change, so we only
// update and send an event when the connectivity has indeed changed.
boolean connectionTypeChanged = (connectionType == null && mConnectionType != null) || (connectionType != null && connectionType.equalsIgnoreCase(mConnectionType));
boolean cellularGenerationChanged = (cellularGeneration == null && mCellularGeneration != null) || (cellularGeneration != null && cellularGeneration.equalsIgnoreCase(mCellularGeneration));
boolean connectionTypeChanged = (connectionType == null && mConnectionType != null) || (connectionType != null && !connectionType.equalsIgnoreCase(mConnectionType));
boolean cellularGenerationChanged = (cellularGeneration == null && mCellularGeneration != null) || (cellularGeneration != null && !cellularGeneration.equalsIgnoreCase(mCellularGeneration));
if (connectionTypeChanged || cellularGenerationChanged) {
mConnectionType = connectionType;
mCellularGeneration = cellularGeneration;
Expand Down

0 comments on commit de12dd5

Please sign in to comment.