Messaging: Remove unnecessary toString() and String.valueOf() calls
Change-Id: I5d5624386ba72b9e7074a7da909f78baaee73f75
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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 int count = db.update(table, values, whereClause, whereValuesArray);
|
||||
if (count > 1) {
|
||||
|
||||
@@ -231,7 +231,7 @@ public class DatabaseWrapper {
|
||||
sb.setLength(sb.length() - 1);
|
||||
}
|
||||
LogUtil.v(TAG, "for query " + sql + "\nplan is: "
|
||||
+ sb.toString());
|
||||
+ sb);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
LogUtil.w(TAG, "Query plan failed ", e);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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) {
|
||||
Assert.fail("InsertNewMessage: Couldn't get threadId in SMS db for these recipients: "
|
||||
+ recipients.toString());
|
||||
+ recipients);
|
||||
// TODO: How do we fail the action?
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ public class MessageData implements Parcelable {
|
||||
case BUGLE_STATUS_INCOMING_EXPIRED_OR_NOT_AVAILABLE:
|
||||
return "INCOMING_EXPIRED_OR_NOT_AVAILABLE";
|
||||
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) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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()
|
||||
.append(desiredWidth).append(KEY_PART_DELIMITER)
|
||||
.append(desiredHeight).append(KEY_PART_DELIMITER)
|
||||
.append(String.valueOf(cropToCircle)).append(KEY_PART_DELIMITER)
|
||||
.append(String.valueOf(circleBackgroundColor)).append(KEY_PART_DELIMITER)
|
||||
.append(String.valueOf(isStatic)).toString();
|
||||
.append(cropToCircle).append(KEY_PART_DELIMITER)
|
||||
.append(circleBackgroundColor).append(KEY_PART_DELIMITER)
|
||||
.append(isStatic).toString();
|
||||
}
|
||||
|
||||
public boolean isStatic() {
|
||||
@@ -110,4 +111,4 @@ public abstract class ImageRequestDescriptor extends MediaRequestDescriptor<Imag
|
||||
// Called once source dimensions finally determined upon loading the image
|
||||
public void updateSourceDimensions(final int sourceWidth, final int sourceHeight) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ public class NetworkUriImageRequest<D extends UriImageRequestDescriptor> extends
|
||||
} catch (MalformedURLException e) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||
"MalformedUrl for image with url: "
|
||||
+ mDescriptor.uri.toString(), e);
|
||||
+ mDescriptor.uri, e);
|
||||
} catch (IOException e) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||
"IOException trying to get inputStream for image with url: "
|
||||
+ mDescriptor.uri.toString(), e);
|
||||
+ mDescriptor.uri, e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
@@ -98,16 +98,16 @@ public class NetworkUriImageRequest<D extends UriImageRequestDescriptor> extends
|
||||
} catch (MalformedURLException e) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||
"MalformedUrl for image with url: "
|
||||
+ mDescriptor.uri.toString(), e);
|
||||
+ mDescriptor.uri, e);
|
||||
} catch (final OutOfMemoryError e) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||
"OutOfMemoryError for image with url: "
|
||||
+ mDescriptor.uri.toString(), e);
|
||||
+ mDescriptor.uri, e);
|
||||
Factory.get().reclaimMemory();
|
||||
} catch (IOException e) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG,
|
||||
"IOException trying to get inputStream for image with url: "
|
||||
+ mDescriptor.uri.toString(), e);
|
||||
+ mDescriptor.uri, e);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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) {
|
||||
return new StringBuilder()
|
||||
.append(uri).append(KEY_PART_DELIMITER)
|
||||
.append(String.valueOf(allowCompression)).append(KEY_PART_DELIMITER)
|
||||
.append(allowCompression).append(KEY_PART_DELIMITER)
|
||||
.append(key).toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user