Messaging: Remove unnecessary toString() and String.valueOf() calls
Change-Id: I5d5624386ba72b9e7074a7da909f78baaee73f75
This commit is contained in:
@@ -234,7 +234,7 @@ public class MmsHttpClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.v(MmsService.TAG, "HTTP: headers\n" + sb.toString());
|
Log.v(MmsService.TAG, "HTTP: headers\n" + sb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -1891,7 +1892,7 @@ public class BugleDatabaseOperations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final String whereClause = rowKey + "=?" + " AND (" + sb.toString() + ")";
|
final String whereClause = rowKey + "=?" + " AND (" + sb + ")";
|
||||||
final String [] whereValuesArray = whereValues.toArray(new String[whereValues.size()]);
|
final String [] whereValuesArray = whereValues.toArray(new String[whereValues.size()]);
|
||||||
final int count = db.update(table, values, whereClause, whereValuesArray);
|
final int count = db.update(table, values, whereClause, whereValuesArray);
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public class DatabaseWrapper {
|
|||||||
sb.setLength(sb.length() - 1);
|
sb.setLength(sb.length() - 1);
|
||||||
}
|
}
|
||||||
LogUtil.v(TAG, "for query " + sql + "\nplan is: "
|
LogUtil.v(TAG, "for query " + sql + "\nplan is: "
|
||||||
+ sb.toString());
|
+ sb);
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
LogUtil.w(TAG, "Query plan failed ", e);
|
LogUtil.w(TAG, "Query plan failed ", e);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -266,7 +267,7 @@ public class InsertNewMessageAction extends Action implements Parcelable {
|
|||||||
|
|
||||||
if (threadId < 0) {
|
if (threadId < 0) {
|
||||||
Assert.fail("InsertNewMessage: Couldn't get threadId in SMS db for these recipients: "
|
Assert.fail("InsertNewMessage: Couldn't get threadId in SMS db for these recipients: "
|
||||||
+ recipients.toString());
|
+ recipients);
|
||||||
// TODO: How do we fail the action?
|
// TODO: How do we fail the action?
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ public class MessageData implements Parcelable {
|
|||||||
case BUGLE_STATUS_INCOMING_EXPIRED_OR_NOT_AVAILABLE:
|
case BUGLE_STATUS_INCOMING_EXPIRED_OR_NOT_AVAILABLE:
|
||||||
return "INCOMING_EXPIRED_OR_NOT_AVAILABLE";
|
return "INCOMING_EXPIRED_OR_NOT_AVAILABLE";
|
||||||
default:
|
default:
|
||||||
return String.valueOf(status) + " (check MessageData)";
|
return status + " (check MessageData)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -95,9 +96,9 @@ public abstract class ImageRequestDescriptor extends MediaRequestDescriptor<Imag
|
|||||||
return new StringBuilder()
|
return new StringBuilder()
|
||||||
.append(desiredWidth).append(KEY_PART_DELIMITER)
|
.append(desiredWidth).append(KEY_PART_DELIMITER)
|
||||||
.append(desiredHeight).append(KEY_PART_DELIMITER)
|
.append(desiredHeight).append(KEY_PART_DELIMITER)
|
||||||
.append(String.valueOf(cropToCircle)).append(KEY_PART_DELIMITER)
|
.append(cropToCircle).append(KEY_PART_DELIMITER)
|
||||||
.append(String.valueOf(circleBackgroundColor)).append(KEY_PART_DELIMITER)
|
.append(circleBackgroundColor).append(KEY_PART_DELIMITER)
|
||||||
.append(String.valueOf(isStatic)).toString();
|
.append(isStatic).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isStatic() {
|
public boolean isStatic() {
|
||||||
@@ -110,4 +111,4 @@ public abstract class ImageRequestDescriptor extends MediaRequestDescriptor<Imag
|
|||||||
// Called once source dimensions finally determined upon loading the image
|
// Called once source dimensions finally determined upon loading the image
|
||||||
public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) {
|
public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ public class NetworkUriImageRequest<D extends UriImageRequestDescriptor> extends
|
|||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||||
"MalformedUrl for image with url: "
|
"MalformedUrl for image with url: "
|
||||||
+ mDescriptor.uri.toString(), e);
|
+ mDescriptor.uri, e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||||
"IOException trying to get inputStream for image with url: "
|
"IOException trying to get inputStream for image with url: "
|
||||||
+ mDescriptor.uri.toString(), e);
|
+ mDescriptor.uri, e);
|
||||||
} finally {
|
} finally {
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
@@ -98,16 +98,16 @@ public class NetworkUriImageRequest<D extends UriImageRequestDescriptor> extends
|
|||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||||
"MalformedUrl for image with url: "
|
"MalformedUrl for image with url: "
|
||||||
+ mDescriptor.uri.toString(), e);
|
+ mDescriptor.uri, e);
|
||||||
} catch (final OutOfMemoryError e) {
|
} catch (final OutOfMemoryError e) {
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||||
"OutOfMemoryError for image with url: "
|
"OutOfMemoryError for image with url: "
|
||||||
+ mDescriptor.uri.toString(), e);
|
+ mDescriptor.uri, e);
|
||||||
Factory.get().reclaimMemory();
|
Factory.get().reclaimMemory();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||||
"IOException trying to get inputStream for image with url: "
|
"IOException trying to get inputStream for image with url: "
|
||||||
+ mDescriptor.uri.toString(), e);
|
+ mDescriptor.uri, e);
|
||||||
} finally {
|
} finally {
|
||||||
if (inputStream != null) {
|
if (inputStream != null) {
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -72,7 +73,7 @@ public class UriImageRequestDescriptor extends ImageRequestDescriptor {
|
|||||||
if (key != null) {
|
if (key != null) {
|
||||||
return new StringBuilder()
|
return new StringBuilder()
|
||||||
.append(uri).append(KEY_PART_DELIMITER)
|
.append(uri).append(KEY_PART_DELIMITER)
|
||||||
.append(String.valueOf(allowCompression)).append(KEY_PART_DELIMITER)
|
.append(allowCompression).append(KEY_PART_DELIMITER)
|
||||||
.append(key).toString();
|
.append(key).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2008 Esmertec AG.
|
* Copyright (C) 2007-2008 Esmertec AG.
|
||||||
* Copyright (C) 2007-2008 The Android Open Source Project
|
* Copyright (C) 2007-2008 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -876,7 +877,7 @@ public class PduPersister {
|
|||||||
final ContentValues cv = new ContentValues();
|
final ContentValues cv = new ContentValues();
|
||||||
cv.put(Mms.Part.TEXT, new EncodedStringValue(charset, data).getString());
|
cv.put(Mms.Part.TEXT, new EncodedStringValue(charset, data).getString());
|
||||||
if (mContentResolver.update(uri, cv, null, null) != 1) {
|
if (mContentResolver.update(uri, cv, null, null) != 1) {
|
||||||
throw new MmsException("unable to update " + uri.toString());
|
throw new MmsException("unable to update " + uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class MmsUtils {
|
|||||||
case MMS_REQUEST_NO_RETRY:
|
case MMS_REQUEST_NO_RETRY:
|
||||||
return "NO_RETRY";
|
return "NO_RETRY";
|
||||||
default:
|
default:
|
||||||
return String.valueOf(status) + " (check MmsUtils)";
|
return status + " (check MmsUtils)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -162,8 +163,7 @@ public class ClassZeroActivity extends Activity {
|
|||||||
} else {
|
} else {
|
||||||
mHandler.sendEmptyMessageAtTime(ON_AUTO_SAVE, mTimerSet);
|
mHandler.sendEmptyMessageAtTime(ON_AUTO_SAVE, mTimerSet);
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
Log.d(TAG, "onRestart time = " + Long.toString(mTimerSet) + " "
|
Log.d(TAG, "onRestart time = " + mTimerSet + " " + this);
|
||||||
+ this.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,8 +173,7 @@ public class ClassZeroActivity extends Activity {
|
|||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
outState.putLong(TIMER_FIRE, mTimerSet);
|
outState.putLong(TIMER_FIRE, mTimerSet);
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
Log.d(TAG, "onSaveInstanceState time = " + Long.toString(mTimerSet)
|
Log.d(TAG, "onSaveInstanceState time = " + mTimerSet + " " + this);
|
||||||
+ " " + this.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,8 +182,7 @@ public class ClassZeroActivity extends Activity {
|
|||||||
super.onStop();
|
super.onStop();
|
||||||
mHandler.removeMessages(ON_AUTO_SAVE);
|
mHandler.removeMessages(ON_AUTO_SAVE);
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
Log.d(TAG, "onStop time = " + Long.toString(mTimerSet)
|
Log.d(TAG, "onStop time = " + mTimerSet + " " + this);
|
||||||
+ " " + this.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -296,7 +297,7 @@ public class MessageDetailsDialog {
|
|||||||
if (recipients != null) {
|
if (recipients != null) {
|
||||||
details.append('\n');
|
details.append('\n');
|
||||||
details.append("Thread recipients: ");
|
details.append("Thread recipients: ");
|
||||||
details.append(recipients.toString());
|
details.append(recipients);
|
||||||
|
|
||||||
if (mms != null) {
|
if (mms != null) {
|
||||||
final String from = MmsUtils.getMmsSender(recipients, mms.getUri());
|
final String from = MmsUtils.getMmsSender(recipients, mms.getUri());
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public final class Assert {
|
|||||||
if (caller != null) {
|
if (caller != null) {
|
||||||
// This log message can be de-obfuscated by the Proguard retrace tool, just like a
|
// This log message can be de-obfuscated by the Proguard retrace tool, just like a
|
||||||
// full stack trace from a crash.
|
// full stack trace from a crash.
|
||||||
LogUtil.e(LogUtil.BUGLE_TAG, "\tat " + caller.toString());
|
LogUtil.e(LogUtil.BUGLE_TAG, "\tat " + caller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 The Android Open Source Project
|
* Copyright (C) 2015 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -36,7 +37,7 @@ public class BugleSubscriptionPrefs extends BuglePrefsImpl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSharedPreferencesName() {
|
public String getSharedPreferencesName() {
|
||||||
return SHARED_PREFERENCES_PER_SUBSCRIPTION_PREFIX + String.valueOf(mSubId);
|
return SHARED_PREFERENCES_PER_SUBSCRIPTION_PREFIX + mSubId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ public class DebugUtils {
|
|||||||
public static void dumpSms(final long id, final android.telephony.SmsMessage[] messages,
|
public static void dumpSms(final long id, final android.telephony.SmsMessage[] messages,
|
||||||
final String format) {
|
final String format) {
|
||||||
try {
|
try {
|
||||||
final String dumpFileName = MmsUtils.SMS_DUMP_PREFIX + Long.toString(id);
|
final String dumpFileName = MmsUtils.SMS_DUMP_PREFIX + id;
|
||||||
final File dumpFile = DebugUtils.getDebugFile(dumpFileName, true);
|
final File dumpFile = DebugUtils.getDebugFile(dumpFileName, true);
|
||||||
if (dumpFile != null) {
|
if (dumpFile != null) {
|
||||||
final FileOutputStream fos = new FileOutputStream(dumpFile);
|
final FileOutputStream fos = new FileOutputStream(dumpFile);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 The Android Open Source Project
|
* Copyright (C) 2012 The Android Open Source Project
|
||||||
|
* Copyright (C) 2024 The LineageOS Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -291,7 +292,7 @@ class ExifOutputStream extends FilterOutputStream {
|
|||||||
dataOutputStream.writeShort(tag.getDataType());
|
dataOutputStream.writeShort(tag.getDataType());
|
||||||
dataOutputStream.writeInt(tag.getComponentCount());
|
dataOutputStream.writeInt(tag.getComponentCount());
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.v(TAG, "\n" + tag.toString());
|
Log.v(TAG, "\n" + tag);
|
||||||
}
|
}
|
||||||
if (tag.getDataSize() > 4) {
|
if (tag.getDataSize() > 4) {
|
||||||
dataOutputStream.writeInt(tag.getOffset());
|
dataOutputStream.writeInt(tag.getOffset());
|
||||||
|
|||||||
@@ -659,22 +659,22 @@ public class ExifParser {
|
|||||||
Object event = mCorrespondingEvent.firstEntry().getValue();
|
Object event = mCorrespondingEvent.firstEntry().getValue();
|
||||||
if (event instanceof ImageEvent) {
|
if (event instanceof ImageEvent) {
|
||||||
// Tag value overlaps thumbnail, ignore thumbnail.
|
// Tag value overlaps thumbnail, ignore thumbnail.
|
||||||
Log.w(TAG, "Thumbnail overlaps value for tag: \n" + tag.toString());
|
Log.w(TAG, "Thumbnail overlaps value for tag: \n" + tag);
|
||||||
Entry<Integer, Object> entry = mCorrespondingEvent.pollFirstEntry();
|
Entry<Integer, Object> entry = mCorrespondingEvent.pollFirstEntry();
|
||||||
Log.w(TAG, "Invalid thumbnail offset: " + entry.getKey());
|
Log.w(TAG, "Invalid thumbnail offset: " + entry.getKey());
|
||||||
} else {
|
} else {
|
||||||
// Tag value overlaps another tag, shorten count
|
// Tag value overlaps another tag, shorten count
|
||||||
if (event instanceof IfdEvent) {
|
if (event instanceof IfdEvent) {
|
||||||
Log.w(TAG, "Ifd " + ((IfdEvent) event).ifd
|
Log.w(TAG, "Ifd " + ((IfdEvent) event).ifd
|
||||||
+ " overlaps value for tag: \n" + tag.toString());
|
+ " overlaps value for tag: \n" + tag);
|
||||||
} else if (event instanceof ExifTagEvent) {
|
} else if (event instanceof ExifTagEvent) {
|
||||||
Log.w(TAG, "Tag value for tag: \n"
|
Log.w(TAG, "Tag value for tag: \n"
|
||||||
+ ((ExifTagEvent) event).tag.toString()
|
+ ((ExifTagEvent) event).tag.toString()
|
||||||
+ " overlaps value for tag: \n" + tag.toString());
|
+ " overlaps value for tag: \n" + tag);
|
||||||
}
|
}
|
||||||
size = mCorrespondingEvent.firstEntry().getKey()
|
size = mCorrespondingEvent.firstEntry().getKey()
|
||||||
- mTiffStream.getReadByteCount();
|
- mTiffStream.getReadByteCount();
|
||||||
Log.w(TAG, "Invalid size of tag: \n" + tag.toString()
|
Log.w(TAG, "Invalid size of tag: \n" + tag
|
||||||
+ " setting count to: " + size);
|
+ " setting count to: " + size);
|
||||||
tag.forceSetComponentCount(size);
|
tag.forceSetComponentCount(size);
|
||||||
}
|
}
|
||||||
@@ -734,7 +734,7 @@ public class ExifParser {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (LOGV) {
|
if (LOGV) {
|
||||||
Log.v(TAG, "\n" + tag.toString());
|
Log.v(TAG, "\n" + tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class WidgetConversationService extends RemoteViewsService {
|
|||||||
}
|
}
|
||||||
final Uri uri = MessagingContentProvider.buildConversationMessagesUri(mConversationId);
|
final Uri uri = MessagingContentProvider.buildConversationMessagesUri(mConversationId);
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
LogUtil.w(TAG, "doQuery uri: " + uri.toString());
|
LogUtil.w(TAG, "doQuery uri: " + uri);
|
||||||
}
|
}
|
||||||
return mContext.getContentResolver().query(uri,
|
return mContext.getContentResolver().query(uri,
|
||||||
ConversationMessageData.getProjection(),
|
ConversationMessageData.getProjection(),
|
||||||
|
|||||||
Reference in New Issue
Block a user