diff --git a/wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java b/wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java index f541c690..c953bca4 100644 --- a/wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java +++ b/wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java @@ -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; } @@ -915,10 +912,6 @@ public List getNearbyAccessPoints(boolean filterDuplicates) { } scanResultsToReturn.set(i, newScanResult); } - } else { - if (LogUtil.isLoggable(TAG, Log.DEBUG, mLoggingEnabled)) { - Log.d(TAG, "SSID did not match"); - } } } @@ -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"); - } } } @@ -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)) {