Skip to content

Commit

Permalink
Even more cleanup for 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
isuPatches committed Jul 10, 2017
1 parent 086098c commit 1d2c320
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ public void run() {
@CallingThread
public int addWPA2Network(String ssid, String password) {
if (TextUtils.isEmpty(ssid) || TextUtils.isEmpty(password)) {
if (LogUtil.isLoggable(TAG, Log.WARN, mLoggingEnabled)) {
Log.w(TAG, String.format("Breaking due to missing ssid or password. ssid: %s, password: %s", ssid, password));
}
return WiseFyCodes.MISSING_PARAMETER;
}

Expand Down Expand Up @@ -915,10 +912,6 @@ public List<ScanResult> getNearbyAccessPoints(boolean filterDuplicates) {
}
scanResultsToReturn.set(i, newScanResult);
}
} else {
if (LogUtil.isLoggable(TAG, Log.DEBUG, mLoggingEnabled)) {
Log.d(TAG, "SSID did not match");
}
}
}

Expand Down Expand Up @@ -983,10 +976,6 @@ public void run() {
}
scanResultsToReturn.set(i, newScanResult);
}
} else {
if (LogUtil.isLoggable(TAG, Log.DEBUG, mLoggingEnabled)) {
Log.d(TAG, "SSID did not match");
}
}
}

Expand Down Expand Up @@ -1181,8 +1170,7 @@ public boolean isDeviceConnectedToSSID(String ssid) {
Log.d(TAG, String.format("Current SSID: %s, Desired SSID: %s", currentSSID, ssid));
}
if (currentSSID.equals(ssid)) {
if (mConnectivityManager != null
&& mConnectivityManager.getActiveNetworkInfo() != null
if (mConnectivityManager.getActiveNetworkInfo() != null
&& mConnectivityManager.getActiveNetworkInfo().isAvailable()
&& mConnectivityManager.getActiveNetworkInfo().isConnected()) {
if (LogUtil.isLoggable(TAG, Log.DEBUG, mLoggingEnabled)) {
Expand Down

0 comments on commit 1d2c320

Please sign in to comment.