Log messages of waiting threads belong to Log.d

Fixes #227
This commit is contained in:
Daniel Martí 2015-04-15 18:13:41 +02:00
parent e36ed7f941
commit f69985d8df

View File

@ -10,6 +10,7 @@ import android.os.IBinder;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import org.fdroid.fdroid.BuildConfig;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Preferences;
import org.fdroid.fdroid.Utils;
@ -44,14 +45,18 @@ public class WifiStateChangeService extends Service {
while (!wifiManager.isWifiEnabled()) {
if (isCancelled())
return null;
Log.i(TAG, "waiting for the wifi to be enabled...");
if (BuildConfig.DEBUG) {
Log.d(TAG, "waiting for the wifi to be enabled...");
}
Thread.sleep(1000);
}
int ipAddress = wifiManager.getConnectionInfo().getIpAddress();
while (ipAddress == 0) {
if (isCancelled())
return null;
Log.i(TAG, "waiting for an IP address...");
if (BuildConfig.DEBUG) {
Log.d(TAG, "waiting for an IP address...");
}
Thread.sleep(1000);
ipAddress = wifiManager.getConnectionInfo().getIpAddress();
}