forked from upstream-mirrors/quik
Clean up logging
This commit is contained in:
@@ -29,7 +29,6 @@ import timber.log.Timber;
|
||||
* @hide
|
||||
*/
|
||||
public class LegacyVpnInfo implements Parcelable {
|
||||
private static final String TAG = "LegacyVpnInfo";
|
||||
|
||||
public static final int STATE_DISCONNECTED = 0;
|
||||
public static final int STATE_INITIALIZING = 1;
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.nio.charset.Charset;
|
||||
* @hide
|
||||
*/
|
||||
public class VpnProfile implements Cloneable, Parcelable {
|
||||
private static final String TAG = "VpnProfile";
|
||||
|
||||
// Match these constants with R.array.vpn_types.
|
||||
public static final int TYPE_PPTP = 0;
|
||||
public static final int TYPE_L2TP_IPSEC_PSK = 1;
|
||||
@@ -178,7 +176,7 @@ public class VpnProfile implements Cloneable, Parcelable {
|
||||
return true;
|
||||
|
||||
} catch (IllegalArgumentException e) {
|
||||
Timber.w("Invalid address", e);
|
||||
Timber.w(e, "Invalid address");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ import java.util.List;
|
||||
* {@hide}
|
||||
*/
|
||||
public class GsmAlphabet {
|
||||
private static final String TAG = "GSM";
|
||||
|
||||
private GsmAlphabet() {
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import android.content.res.XmlResourceParser;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class MmsConfig {
|
||||
private static final String TAG = "MmsConfig";
|
||||
private static final boolean DEBUG = true;
|
||||
private static final boolean LOCAL_LOGV = true;
|
||||
|
||||
@@ -302,11 +301,11 @@ public class MmsConfig {
|
||||
}
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
Timber.e("loadMmsSettings caught ", e);
|
||||
Timber.e(e, "loadMmsSettings caught ");
|
||||
} catch (NumberFormatException e) {
|
||||
Timber.e("loadMmsSettings caught ", e);
|
||||
Timber.e(e, "loadMmsSettings caught ");
|
||||
} catch (IOException e) {
|
||||
Timber.e("loadMmsSettings caught ", e);
|
||||
Timber.e(e, "loadMmsSettings caught ");
|
||||
} finally {
|
||||
parser.close();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.w3c.dom.events.EventTarget;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class EventTargetImpl implements EventTarget {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private ArrayList<EventListenerEntry> mListenerEntries;
|
||||
private EventTarget mNodeTarget;
|
||||
|
||||
@@ -100,7 +99,7 @@ public class EventTargetImpl implements EventTarget {
|
||||
catch (Exception e) {
|
||||
// Any exceptions thrown inside an EventListener will
|
||||
// not stop propagation of the event
|
||||
Timber.w("Catched EventListener exception", e);
|
||||
Timber.w(e, "Catched EventListener exception");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ import org.w3c.dom.smil.TimeList;
|
||||
import timber.log.Timber;
|
||||
|
||||
public abstract class ElementTimeImpl implements ElementTime {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private static final String FILL_REMOVE_ATTRIBUTE = "remove";
|
||||
private static final String FILL_FREEZE_ATTRIBUTE = "freeze";
|
||||
private static final String FILL_HOLD_ATTRIBUTE = "hold";
|
||||
@@ -133,7 +131,7 @@ public abstract class ElementTimeImpl implements ElementTime {
|
||||
getEndConstraints()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Ignore badly formatted times
|
||||
Timber.e("Malformed time value.", e);
|
||||
Timber.e(e, "Malformed time value.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,6 @@ import timber.log.Timber;
|
||||
* <li>The player runs in a different thread which intends not to block the main thread.</li>
|
||||
*/
|
||||
public class SmilPlayer implements Runnable {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
private static final int TIMESLICE = 200;
|
||||
|
||||
@@ -509,7 +507,7 @@ public class SmilPlayer implements Runnable {
|
||||
mState = SmilPlayerState.PLAYING;
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Timber.e("Unexpected InterruptedException.", e);
|
||||
Timber.e(e, "Unexpected InterruptedException.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -660,7 +658,7 @@ public class SmilPlayer implements Runnable {
|
||||
try {
|
||||
waitForEntry(offset - mCurrentTime);
|
||||
} catch (InterruptedException e) {
|
||||
Timber.e("Unexpected InterruptedException.", e);
|
||||
Timber.e(e, "Unexpected InterruptedException.");
|
||||
}
|
||||
|
||||
while (isPauseAction() || isStopAction() || isReloadAction() || isNextAction() ||
|
||||
|
||||
@@ -47,8 +47,6 @@ public class SmilRegionElementImpl extends SmilElementImpl implements
|
||||
private static final String RIGHT_ATTRIBUTE_NAME = "right";
|
||||
private static final String BOTTOM_ATTRIBUTE_NAME = "bottom";
|
||||
private static final String FIT_ATTRIBUTE_NAME = "fit";
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
SmilRegionElementImpl(SmilDocumentImpl owner, String tagName) {
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.android.mms.logs.LogTag;
|
||||
import com.android.mms.dom.smil.SmilDocumentImpl;
|
||||
|
||||
public class SmilContentHandler extends DefaultHandler {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.w3c.dom.smil.SMILDocument;
|
||||
import org.w3c.dom.smil.SMILElement;
|
||||
|
||||
public class SmilXmlSerializer {
|
||||
private static final String TAG = "SmilXmlSerializer";
|
||||
|
||||
public static void serialize(SMILDocument smilDoc, OutputStream out) {
|
||||
try {
|
||||
@@ -41,9 +40,9 @@ public class SmilXmlSerializer {
|
||||
writeElement(writer, smilDoc.getDocumentElement());
|
||||
writer.flush();
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
Timber.e("exception thrown", e);
|
||||
Timber.e(e, "exception thrown");
|
||||
} catch (IOException e) {
|
||||
Timber.e("exception thrown", e);
|
||||
Timber.e(e, "exception thrown");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ import android.content.Context;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class HVGALayoutParameters implements LayoutParameters {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private int mType = -1;
|
||||
|
||||
@@ -26,8 +26,6 @@ import timber.log.Timber;
|
||||
* MMS presentation layout management.
|
||||
*/
|
||||
public class LayoutManager {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
@@ -36,8 +36,6 @@ import java.net.URISyntaxException;
|
||||
* APN settings used for MMS transactions
|
||||
*/
|
||||
public class ApnSettings {
|
||||
private static final String TAG = "ApnSettings";
|
||||
|
||||
// MMSC URL
|
||||
private final String mServiceCenter;
|
||||
// MMSC proxy address
|
||||
|
||||
@@ -44,8 +44,6 @@ import com.klinker.android.send_message.Transaction;
|
||||
* Request to download an MMS
|
||||
*/
|
||||
public class DownloadRequest extends MmsRequest {
|
||||
private static final String TAG = "DownloadRequest";
|
||||
|
||||
private static final String LOCATION_SELECTION =
|
||||
Telephony.Mms.MESSAGE_TYPE + "=? AND " + Telephony.Mms.CONTENT_LOCATION + " =?";
|
||||
|
||||
@@ -235,11 +233,11 @@ public class DownloadRequest extends MmsRequest {
|
||||
|
||||
return messageUri;
|
||||
} catch (MmsException e) {
|
||||
Timber.e("DownloadRequest.persistIfRequired: can not persist message", e);
|
||||
Timber.e(e, "DownloadRequest.persistIfRequired: can not persist message");
|
||||
} catch (SQLiteException e) {
|
||||
Timber.e("DownloadRequest.persistIfRequired: can not update message", e);
|
||||
Timber.e(e, "DownloadRequest.persistIfRequired: can not update message");
|
||||
} catch (RuntimeException e) {
|
||||
Timber.e("DownloadRequest.persistIfRequired: can not parse response", e);
|
||||
Timber.e(e, "DownloadRequest.persistIfRequired: can not parse response");
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@ import java.util.Map;
|
||||
*
|
||||
*/
|
||||
public class MmsConfigManager {
|
||||
private static final String TAG = "MmsConfigManager";
|
||||
|
||||
private static volatile MmsConfigManager sInstance = new MmsConfigManager();
|
||||
|
||||
public static MmsConfigManager getInstance() {
|
||||
|
||||
@@ -28,8 +28,6 @@ import java.io.IOException;
|
||||
* XML processor for mms_config.xml
|
||||
*/
|
||||
public class MmsConfigXmlProcessor {
|
||||
private static final String TAG = "MmsConfigXmlProcessor";
|
||||
|
||||
public interface MmsConfigHandler {
|
||||
public void process(String key, String value, String type);
|
||||
}
|
||||
@@ -93,9 +91,9 @@ public class MmsConfigXmlProcessor {
|
||||
processMmsConfig();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Timber.e("MmsConfigXmlProcessor: I/O failure " + e, e);
|
||||
Timber.e(e, "MmsConfigXmlProcessor: I/O failure ");
|
||||
} catch (XmlPullParserException e) {
|
||||
Timber.e("MmsConfigXmlProcessor: parsing failure " + e, e);
|
||||
Timber.e(e, "MmsConfigXmlProcessor: parsing failure");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +131,7 @@ public class MmsConfigXmlProcessor {
|
||||
}
|
||||
return mLogStringBuilder.toString();
|
||||
} catch (XmlPullParserException e) {
|
||||
Timber.e("xmlParserDebugContext: " + e, e);
|
||||
Timber.e(e, "xmlParserDebugContext: ");
|
||||
}
|
||||
}
|
||||
return "Unknown";
|
||||
|
||||
@@ -207,14 +207,14 @@ public class MmsHttpClient {
|
||||
return responseBody;
|
||||
} catch (MalformedURLException e) {
|
||||
final String redactedUrl = redactUrlForNonVerbose(urlString);
|
||||
Timber.e("HTTP: invalid URL " + redactedUrl, e);
|
||||
Timber.e(e, "HTTP: invalid URL %s", redactedUrl);
|
||||
throw new MmsHttpException(0/*statusCode*/, "Invalid URL " + redactedUrl, e);
|
||||
} catch (ProtocolException e) {
|
||||
final String redactedUrl = redactUrlForNonVerbose(urlString);
|
||||
Timber.e("HTTP: invalid URL protocol " + redactedUrl, e);
|
||||
Timber.e(e, "HTTP: invalid URL protocol %s", redactedUrl);
|
||||
throw new MmsHttpException(0/*statusCode*/, "Invalid URL protocol " + redactedUrl, e);
|
||||
} catch (IOException e) {
|
||||
Timber.e("HTTP: IO failure", e);
|
||||
Timber.e(e, "HTTP: IO failure");
|
||||
throw new MmsHttpException(0/*statusCode*/, e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
|
||||
@@ -35,7 +35,6 @@ import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
private static final String TAG = "MmsNetworkManager";
|
||||
// Timeout used to call ConnectivityManager.requestNetwork
|
||||
private static final int NETWORK_REQUEST_TIMEOUT_MILLIS = 60 * 1000;
|
||||
// Wait timeout for this class, a little bit longer than the above timeout
|
||||
@@ -155,7 +154,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
synchronized (this) {
|
||||
if (mMmsRequestCount > 0) {
|
||||
mMmsRequestCount -= 1;
|
||||
Timber.d("MmsNetworkManager: release, count=" + mMmsRequestCount);
|
||||
Timber.d("MmsNetworkManager: release, count=%s", mMmsRequestCount);
|
||||
if (mMmsRequestCount < 1) {
|
||||
releaseRequestLocked(mNetworkCallback);
|
||||
}
|
||||
@@ -173,7 +172,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
@Override
|
||||
public void onAvailable(Network network) {
|
||||
super.onAvailable(network);
|
||||
Timber.d("NetworkCallbackListener.onAvailable: network=" + network);
|
||||
Timber.d("NetworkCallbackListener.onAvailable: network=%s", network);
|
||||
synchronized (MmsNetworkManager.this) {
|
||||
mNetwork = network;
|
||||
MmsNetworkManager.this.notifyAll();
|
||||
@@ -183,7 +182,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
@Override
|
||||
public void onLost(Network network) {
|
||||
super.onLost(network);
|
||||
Timber.d("NetworkCallbackListener.onLost: network=" + network);
|
||||
Timber.d("NetworkCallbackListener.onLost: network=%s", network);
|
||||
synchronized (MmsNetworkManager.this) {
|
||||
releaseRequestLocked(this);
|
||||
MmsNetworkManager.this.notifyAll();
|
||||
@@ -205,7 +204,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
connectivityManager.requestNetwork(
|
||||
mNetworkRequest, mNetworkCallback);
|
||||
} catch (SecurityException e) {
|
||||
Timber.e("permission exception... skipping it for testing purposes", e);
|
||||
Timber.e(e, "permission exception... skipping it for testing purposes");
|
||||
permissionError = true;
|
||||
}
|
||||
}
|
||||
@@ -222,7 +221,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
try {
|
||||
connectivityManager.unregisterNetworkCallback(callback);
|
||||
} catch (Exception e) {
|
||||
Timber.e("couldn't unregister", e);
|
||||
Timber.e(e, "couldn't unregister");
|
||||
}
|
||||
}
|
||||
resetLocked();
|
||||
@@ -322,7 +321,7 @@ public class MmsNetworkManager implements com.squareup.okhttp.internal.Network {
|
||||
if (mmsNetworkInfo != null) {
|
||||
apnName = mmsNetworkInfo.getExtraInfo();
|
||||
}
|
||||
Timber.d("MmsNetworkManager: getApnName: " + apnName);
|
||||
Timber.d("MmsNetworkManager: getApnName: %s", apnName);
|
||||
return apnName;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@ import com.android.mms.service_alt.exception.MmsHttpException;
|
||||
* Base class for MMS requests. This has the common logic of sending/downloading MMS.
|
||||
*/
|
||||
public abstract class MmsRequest {
|
||||
private static final String TAG = "MmsRequest";
|
||||
|
||||
private static final int RETRY_TIMES = 3;
|
||||
|
||||
/**
|
||||
@@ -183,7 +181,7 @@ public abstract class MmsRequest {
|
||||
try {
|
||||
networkManager.acquireNetwork();
|
||||
} catch (Exception e) {
|
||||
Timber.e("error acquiring network", e);
|
||||
Timber.e(e, "error acquiring network");
|
||||
}
|
||||
|
||||
final String apnName = networkManager.getApnName();
|
||||
@@ -210,7 +208,7 @@ public abstract class MmsRequest {
|
||||
networkManager.releaseNetwork();
|
||||
}
|
||||
} catch (ApnException e) {
|
||||
Timber.e("MmsRequest: APN failure", e);
|
||||
Timber.e(e, "MmsRequest: APN failure");
|
||||
result = SmsManager.MMS_ERROR_INVALID_APN;
|
||||
break;
|
||||
// } catch (MmsNetworkException e) {
|
||||
@@ -218,12 +216,12 @@ public abstract class MmsRequest {
|
||||
// result = SmsManager.MMS_ERROR_UNABLE_CONNECT_MMS;
|
||||
// // Retry
|
||||
} catch (MmsHttpException e) {
|
||||
Timber.e("MmsRequest: HTTP or network I/O failure", e);
|
||||
Timber.e(e, "MmsRequest: HTTP or network I/O failure");
|
||||
result = SmsManager.MMS_ERROR_HTTP_FAILURE;
|
||||
httpStatusCode = e.getStatusCode();
|
||||
// Retry
|
||||
} catch (Exception e) {
|
||||
Timber.e("MmsRequest: unexpected failure", e);
|
||||
Timber.e(e, "MmsRequest: unexpected failure");
|
||||
result = SmsManager.MMS_ERROR_UNSPECIFIED;
|
||||
break;
|
||||
}
|
||||
@@ -283,7 +281,7 @@ public abstract class MmsRequest {
|
||||
}
|
||||
pendingIntent.send(context, result, fillIn);
|
||||
} catch (PendingIntent.CanceledException e) {
|
||||
Timber.e("MmsRequest: sending pending intent canceled", e);
|
||||
Timber.e(e, "MmsRequest: sending pending intent canceled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.util.Locale;
|
||||
*/
|
||||
public class PhoneUtils {
|
||||
|
||||
private static final String TAG = "PhoneUtils";
|
||||
|
||||
/**
|
||||
* Get a canonical national format phone number. If parsing fails, just return the
|
||||
* original number.
|
||||
|
||||
@@ -43,8 +43,6 @@ import com.google.android.mms.util_alt.SqliteWrapper;
|
||||
* Request to send an MMS
|
||||
*/
|
||||
public class SendRequest extends MmsRequest {
|
||||
private static final String TAG = "SendRequest";
|
||||
|
||||
private final Uri mPduUri;
|
||||
private byte[] mPduData;
|
||||
private final String mLocationUrl;
|
||||
@@ -162,7 +160,7 @@ public class SendRequest extends MmsRequest {
|
||||
// } catch (MmsException e) {
|
||||
// Timber.e("SendRequest.persistIfRequired: can not persist message", e);
|
||||
} catch (RuntimeException e) {
|
||||
Timber.e("SendRequest.persistIfRequired: unexpected parsing failure", e);
|
||||
Timber.e(e, "SendRequest.persistIfRequired: unexpected parsing failure");
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
@@ -225,7 +223,7 @@ public class SendRequest extends MmsRequest {
|
||||
try {
|
||||
context.revokeUriPermission(mPduUri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
} catch (NullPointerException e) {
|
||||
Timber.e("error revoking permissions", e);
|
||||
Timber.e(e, "error revoking permissions");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ import timber.log.Timber;
|
||||
import com.google.android.mms.util_alt.SqliteWrapper;
|
||||
|
||||
public class SubscriptionIdChecker {
|
||||
private static final String TAG = "SubscriptionIdChecker";
|
||||
|
||||
private static SubscriptionIdChecker sInstance;
|
||||
private boolean mCanUseSubscriptionId = false;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import timber.log.Timber;
|
||||
* Default retry scheme, based on specs.
|
||||
*/
|
||||
public class DefaultRetryScheme extends AbstractRetryScheme {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
* We should manage to call SMSManager.downloadMultimediaMessage().
|
||||
*/
|
||||
public class DownloadManager {
|
||||
private static final String TAG = "DownloadManager";
|
||||
private static DownloadManager ourInstance = new DownloadManager();
|
||||
private static final ConcurrentHashMap<String, MmsDownloadReceiver> mMap = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@ import com.android.mms.logs.LogTag;
|
||||
import com.android.mms.MmsConfig;
|
||||
|
||||
public class HttpUtils {
|
||||
private static final String TAG = LogTag.TRANSACTION;
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
|
||||
|
||||
|
||||
@@ -42,8 +42,6 @@ import com.google.android.mms.util_alt.SqliteWrapper;
|
||||
import com.klinker.android.send_message.Settings;
|
||||
|
||||
public class MmsMessageSender implements MessageSender {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private final Context mContext;
|
||||
private final Uri mMessageUri;
|
||||
private final long mMessageSize;
|
||||
@@ -181,9 +179,9 @@ public class MmsMessageSender implements MessageSender {
|
||||
group, null, subId);
|
||||
context.startService(new Intent(context, TransactionService.class));
|
||||
} catch (InvalidHeaderValueException e) {
|
||||
Timber.e("Invalide header value", e);
|
||||
Timber.e(e, "Invalide header value");
|
||||
} catch (MmsException e) {
|
||||
Timber.e("Persist message failed", e);
|
||||
Timber.e(e, "Persist message failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ import timber.log.Timber; import android.util.Log; import static com.klinker.and
|
||||
*/
|
||||
public class MmsPushOutboxMessages extends BroadcastReceiver {
|
||||
private static final String INTENT_MMS_SEND_OUTBOX_MSG = "android.intent.action.MMS_SEND_OUTBOX_MSG";
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@@ -40,7 +39,7 @@ public class MmsPushOutboxMessages extends BroadcastReceiver {
|
||||
}
|
||||
String action = intent.getAction();
|
||||
if(action.equalsIgnoreCase(INTENT_MMS_SEND_OUTBOX_MSG)){
|
||||
Log.d(TAG,"Now waking up the MMS service");
|
||||
Timber.d("Now waking up the MMS service");
|
||||
context.startService(new Intent(context, TransactionService.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.klinker.android.send_message.Utils;
|
||||
* </ul>
|
||||
*/
|
||||
public class MmsSystemEventReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static ConnectivityManager mConnMgr = null;
|
||||
|
||||
public static void wakeUpService(Context context) {
|
||||
|
||||
+8
-11
@@ -73,8 +73,6 @@ import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_UNRECOGNIZED;
|
||||
* in case the client is in immediate retrieve mode.
|
||||
*/
|
||||
public class NotificationTransaction extends Transaction implements Runnable {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private Uri mUri;
|
||||
@@ -92,7 +90,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
mNotificationInd = (NotificationInd)
|
||||
PduPersister.getPduPersister(context).load(mUri);
|
||||
} catch (MmsException e) {
|
||||
Timber.e("Failed to load NotificationInd from: " + uriString, e);
|
||||
Timber.e(e, "Failed to load NotificationInd from: %s", uriString);
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -127,7 +125,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
ind, Inbox.CONTENT_URI, !allowAutoDownload(mContext),
|
||||
group, null, subId);
|
||||
} catch (MmsException e) {
|
||||
Timber.e("Failed to save NotificationInd in constructor.", e);
|
||||
Timber.e(e, "Failed to save NotificationInd in constructor.");
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -159,7 +157,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
boolean autoDownload = allowAutoDownload(mContext);
|
||||
try {
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("Notification transaction launched: " + this);
|
||||
Timber.v("Notification transaction launched: %s", this);
|
||||
}
|
||||
|
||||
// By default, we set status to STATUS_DEFERRED because we
|
||||
@@ -176,7 +174,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
downloadManager.markState(mUri, DownloadManager.STATE_DOWNLOADING);
|
||||
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("Content-Location: " + mContentLocation);
|
||||
Timber.v("Content-Location: %s", mContentLocation);
|
||||
}
|
||||
|
||||
byte[] retrieveConfData = null;
|
||||
@@ -191,8 +189,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
if (retrieveConfData != null) {
|
||||
GenericPdu pdu = new PduParser(retrieveConfData).parse();
|
||||
if ((pdu == null) || (pdu.getMessageType() != MESSAGE_TYPE_RETRIEVE_CONF)) {
|
||||
Timber.e("Invalid M-RETRIEVE.CONF PDU. " +
|
||||
(pdu != null ? "message type: " + pdu.getMessageType() : "null pdu"));
|
||||
Timber.e("Invalid M-RETRIEVE.CONF PDU. %s", (pdu != null ? "message type: " + pdu.getMessageType() : "null pdu"));
|
||||
mTransactionState.setState(FAILED);
|
||||
status = STATUS_UNRECOGNIZED;
|
||||
} else {
|
||||
@@ -219,7 +216,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
// M-NotifyResp.ind from Inbox.
|
||||
SqliteWrapper.delete(mContext, mContext.getContentResolver(),
|
||||
mUri, null, null);
|
||||
Timber.v("NotificationTransaction received new mms message: " + uri);
|
||||
Timber.v("NotificationTransaction received new mms message: %s", uri);
|
||||
// Delete obsolete threads
|
||||
SqliteWrapper.delete(mContext, mContext.getContentResolver(),
|
||||
Threads.OBSOLETE_THREADS_URI, null, null);
|
||||
@@ -235,7 +232,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
}
|
||||
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("status=0x" + Integer.toHexString(status));
|
||||
Timber.v("status=0x%s", Integer.toHexString(status));
|
||||
}
|
||||
|
||||
// Check the status and update the result state of this Transaction.
|
||||
@@ -253,7 +250,7 @@ public class NotificationTransaction extends Transaction implements Runnable {
|
||||
|
||||
sendNotifyRespInd(status);
|
||||
} catch (Throwable t) {
|
||||
Timber.e("error", t);
|
||||
Timber.e(t, "error");
|
||||
} finally {
|
||||
mTransactionState.setContentUri(mUri);
|
||||
if (!autoDownload) {
|
||||
|
||||
@@ -72,7 +72,7 @@ import static com.google.android.mms.pdu_alt.PduHeaders.MESSAGE_TYPE_READ_ORIG_I
|
||||
* TransactionService by passing the push-data to it.
|
||||
*/
|
||||
public class PushReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = true;
|
||||
|
||||
@@ -258,9 +258,9 @@ public class PushReceiver extends BroadcastReceiver {
|
||||
Timber.e("Received unrecognized PDU.");
|
||||
}
|
||||
} catch (MmsException e) {
|
||||
Timber.e("Failed to save the data from PUSH: type=" + type, e);
|
||||
Timber.e(e, "Failed to save the data from PUSH: type=%s", type);
|
||||
} catch (RuntimeException e) {
|
||||
Timber.e("Unexpected RuntimeException.", e);
|
||||
Timber.e(e, "Unexpected RuntimeException.");
|
||||
}
|
||||
|
||||
if (LOCAL_LOGV) {
|
||||
|
||||
@@ -43,8 +43,6 @@ import com.klinker.android.send_message.Utils;
|
||||
* </ul>
|
||||
*/
|
||||
public class ReadRecTransaction extends Transaction implements Runnable{
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private Thread mThread;
|
||||
@@ -92,15 +90,15 @@ public class ReadRecTransaction extends Transaction implements Runnable{
|
||||
mTransactionState.setContentUri(uri);
|
||||
} catch (IOException e) {
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("Failed to send M-Read-Rec.Ind.", e);
|
||||
Timber.v(e, "Failed to send M-Read-Rec.Ind.");
|
||||
}
|
||||
} catch (MmsException e) {
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("Failed to load message from Outbox.", e);
|
||||
Timber.v(e, "Failed to load message from Outbox.");
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.e("Unexpected RuntimeException.", e);
|
||||
Timber.e(e, "Unexpected RuntimeException.");
|
||||
}
|
||||
} finally {
|
||||
if (mTransactionState.getState() != TransactionState.SUCCESS) {
|
||||
|
||||
@@ -57,7 +57,7 @@ import com.klinker.android.send_message.Utils;
|
||||
* </ul>
|
||||
*/
|
||||
public class RetrieveTransaction extends Transaction implements Runnable {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = true;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import com.klinker.android.send_message.BroadcastUtils;
|
||||
import com.klinker.android.send_message.R;
|
||||
|
||||
public class RetryScheduler implements Observer {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = true;
|
||||
|
||||
|
||||
@@ -56,8 +56,6 @@ import java.util.Arrays;
|
||||
* </ul>
|
||||
*/
|
||||
public class SendTransaction extends Transaction implements Runnable {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
private Thread mThread;
|
||||
public final Uri mSendReqURI;
|
||||
|
||||
|
||||
@@ -94,8 +94,6 @@ import java.util.ArrayList;
|
||||
* </ul>
|
||||
*/
|
||||
public class TransactionService extends Service implements Observer {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
|
||||
/**
|
||||
* Used to identify notification intents broadcasted by the
|
||||
* TransactionService when a Transaction is completed.
|
||||
@@ -1022,7 +1020,7 @@ public class TransactionService extends Service implements Observer {
|
||||
stopSelf(serviceId);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Timber.w(e.getMessage(), e);
|
||||
Timber.w(e);
|
||||
}
|
||||
} else {
|
||||
if (numProcessTransaction == 0) {
|
||||
|
||||
@@ -34,10 +34,6 @@ import com.android.mms.logs.LogTag;
|
||||
* settings or of the MMS Client.
|
||||
*/
|
||||
public class TransactionSettings {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = true;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private String mServiceCenter;
|
||||
private String mProxyAddress;
|
||||
private int mProxyPort = -1;
|
||||
@@ -113,7 +109,7 @@ public class TransactionSettings {
|
||||
try {
|
||||
mProxyPort = Integer.parseInt(Transaction.settings.getPort());
|
||||
} catch (NumberFormatException e) {
|
||||
Timber.e("could not get proxy: " + Transaction.settings.getPort(), e);
|
||||
Timber.e(e, "could not get proxy: %s", Transaction.settings.getPort());
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
@@ -27,8 +27,7 @@ import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.Telephony.Mms;
|
||||
|
||||
import com.android.mms.logs.LogTag;
|
||||
import timber.log.Timber; import android.util.Log;
|
||||
import timber.log.Timber;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.internal.telephony.TelephonyProperties;
|
||||
@@ -40,7 +39,6 @@ import com.google.android.mms.pdu_alt.PduPersister;
|
||||
import com.klinker.android.send_message.R;
|
||||
|
||||
public class DownloadManager {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = true;
|
||||
|
||||
@@ -125,7 +123,7 @@ public class DownloadManager {
|
||||
String roaming = SystemPropertiesProxy.get(context,
|
||||
TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null);
|
||||
if (LOCAL_LOGV) {
|
||||
Timber.v("roaming ------> " + roaming);
|
||||
Timber.v("roaming ------> %s", roaming);
|
||||
}
|
||||
return "true".equals(roaming);
|
||||
}
|
||||
@@ -147,7 +145,7 @@ public class DownloadManager {
|
||||
return;
|
||||
}
|
||||
} catch(MmsException e) {
|
||||
Timber.e(e.getMessage(), e);
|
||||
Timber.e(e);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,7 +157,7 @@ public class DownloadManager {
|
||||
Toast.makeText(mContext, getMessage(uri),
|
||||
Toast.LENGTH_LONG).show();
|
||||
} catch (MmsException e) {
|
||||
Timber.e(e.getMessage(), e);
|
||||
Timber.e(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -182,7 +180,7 @@ public class DownloadManager {
|
||||
try {
|
||||
Toast.makeText(mContext, errStr, Toast.LENGTH_LONG).show();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG,"Caught an exception in showErrorCodeToast");
|
||||
Timber.e("Caught an exception in showErrorCodeToast");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -29,8 +29,6 @@ import com.android.mms.logs.LogTag;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class RateController {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
private static final int RATE_LIMIT = 100;
|
||||
|
||||
@@ -22,8 +22,6 @@ import com.android.mms.logs.LogTag;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class SendingProgressTokenManager {
|
||||
private static final String TAG = LogTag.TAG;
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
private static final HashMap<Object, Long> TOKEN_POOL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user