Added Logging messages
This commit is contained in:
parent
38141354f6
commit
4b5160c30c
|
@ -24,6 +24,7 @@
|
||||||
<string name="download_successful">Download successful</string>
|
<string name="download_successful">Download successful</string>
|
||||||
<string name="download_failed">Download failed</string>
|
<string name="download_failed">Download failed</string>
|
||||||
<string name="download_pending">Download pending</string>
|
<string name="download_pending">Download pending</string>
|
||||||
|
<string name="download_running">Download running</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.util.Log;
|
||||||
import de.podfetcher.R;
|
import de.podfetcher.R;
|
||||||
import de.podfetcher.feed.Feed;
|
import de.podfetcher.feed.Feed;
|
||||||
import de.podfetcher.storage.DownloadRequester;
|
import de.podfetcher.storage.DownloadRequester;
|
||||||
|
@ -78,6 +79,7 @@ public class AddFeedActivity extends SherlockActivity {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
}else {
|
}else {
|
||||||
|
Log.d(TAG, "Changing message of dialog.");
|
||||||
dialog.setMessage(AddFeedActivity.this.getString(observer.getResult()));
|
dialog.setMessage(AddFeedActivity.this.getString(observer.getResult()));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -198,7 +198,7 @@ public class DownloadRequester {
|
||||||
break;
|
break;
|
||||||
case DownloadManager.STATUS_RUNNING:
|
case DownloadManager.STATUS_RUNNING:
|
||||||
Log.d(TAG, "Download is running.");
|
Log.d(TAG, "Download is running.");
|
||||||
result = getDownloadStatus(cursor, DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR);
|
result = R.string.download_running;
|
||||||
break;
|
break;
|
||||||
case DownloadManager.STATUS_FAILED:
|
case DownloadManager.STATUS_FAILED:
|
||||||
Log.d(TAG, "Download failed.");
|
Log.d(TAG, "Download failed.");
|
||||||
|
@ -213,8 +213,9 @@ public class DownloadRequester {
|
||||||
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
client.call();
|
client.call();
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
Log.e(TAG, "Error happened when calling client: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(done) {
|
if(done) {
|
||||||
|
@ -222,7 +223,9 @@ public class DownloadRequester {
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
sleep(waiting_intervall);
|
sleep(waiting_intervall);
|
||||||
}catch (InterruptedException e) {}
|
}catch (InterruptedException e) {
|
||||||
|
Log.w(TAG, "Thread was interrupted while waiting.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d(TAG, "Thread stopped.");
|
Log.d(TAG, "Thread stopped.");
|
||||||
|
|
Loading…
Reference in New Issue