forked from upstream-mirrors/quik
Use Timber for all logs
This commit is contained in:
@@ -31,17 +31,14 @@ import android.net.Uri;
|
||||
import android.provider.Telephony.Mms;
|
||||
import android.provider.Telephony.MmsSms;
|
||||
import android.provider.Telephony.MmsSms.PendingMessages;
|
||||
import com.android.mms.logs.LogTag;
|
||||
import com.android.mms.util.DownloadManager;
|
||||
import com.google.android.mms.pdu_alt.PduHeaders;
|
||||
import com.google.android.mms.pdu_alt.PduPersister;
|
||||
import com.klinker.android.logger.Log;
|
||||
import com.klinker.android.send_message.BroadcastUtils;
|
||||
import com.klinker.android.send_message.R;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class RetryScheduler implements Observer {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private final Context mContext;
|
||||
@@ -71,9 +68,7 @@ public class RetryScheduler implements Observer {
|
||||
try {
|
||||
Transaction t = (Transaction) observable;
|
||||
|
||||
if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
|
||||
Log.v(TAG, "[RetryScheduler] update " + observable);
|
||||
}
|
||||
Timber.v("[RetryScheduler] update " + observable);
|
||||
|
||||
// We are only supposed to handle M-Notification.ind, M-Send.req
|
||||
// and M-ReadRec.ind.
|
||||
@@ -172,10 +167,8 @@ public class RetryScheduler implements Observer {
|
||||
if ((retryIndex < scheme.getRetryLimit()) && retry) {
|
||||
long retryAt = current + scheme.getWaitingInterval();
|
||||
|
||||
if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
|
||||
Log.v(TAG, "scheduleRetry: retry for " + uri + " is scheduled at "
|
||||
+ (retryAt - System.currentTimeMillis()) + "ms from now");
|
||||
}
|
||||
Timber.v("scheduleRetry: retry for " + uri + " is scheduled at "
|
||||
+ (retryAt - System.currentTimeMillis()) + "ms from now");
|
||||
|
||||
values.put(PendingMessages.DUE_TIME, retryAt);
|
||||
|
||||
@@ -231,7 +224,7 @@ public class RetryScheduler implements Observer {
|
||||
PendingMessages.CONTENT_URI,
|
||||
values, PendingMessages._ID + "=" + id, null);
|
||||
} else if (LOCAL_LOGV) {
|
||||
Log.v(TAG, "Cannot found correct pending status for: " + msgId);
|
||||
Timber.v("Cannot found correct pending status for: " + msgId);
|
||||
}
|
||||
} finally {
|
||||
cursor.close();
|
||||
@@ -279,7 +272,7 @@ public class RetryScheduler implements Observer {
|
||||
cursor.close();
|
||||
}
|
||||
if (respStatus != 0) {
|
||||
Log.e(TAG, "Response status is: " + respStatus);
|
||||
Timber.e("Response status is: " + respStatus);
|
||||
}
|
||||
return respStatus;
|
||||
}
|
||||
@@ -298,9 +291,7 @@ public class RetryScheduler implements Observer {
|
||||
cursor.close();
|
||||
}
|
||||
if (retrieveStatus != 0) {
|
||||
if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
|
||||
Log.v(TAG, "Retrieve status is: " + retrieveStatus);
|
||||
}
|
||||
Timber.v("Retrieve status is: " + retrieveStatus);
|
||||
}
|
||||
return retrieveStatus;
|
||||
}
|
||||
@@ -323,10 +314,7 @@ public class RetryScheduler implements Observer {
|
||||
Context.ALARM_SERVICE);
|
||||
am.set(AlarmManager.RTC, retryAt, operation);
|
||||
|
||||
if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {
|
||||
Log.v(TAG, "Next retry is scheduled at"
|
||||
+ (retryAt - System.currentTimeMillis()) + "ms from now");
|
||||
}
|
||||
Timber.v("Next retry is scheduled at" + (retryAt - System.currentTimeMillis()) + "ms from now");
|
||||
}
|
||||
} finally {
|
||||
cursor.close();
|
||||
|
||||
Reference in New Issue
Block a user