mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-06-04 22:43:09 +01:00
Reduce usage of Log.w()
This commit is contained in:
@@ -84,7 +84,7 @@ public class BitmapUtil {
|
||||
scaledBitmap.compress(CompressFormat.JPEG, quality, baos);
|
||||
bytes = baos.toByteArray();
|
||||
|
||||
Log.w(TAG, "iteration with quality " + quality + " size " + (bytes.length / 1024) + "kb");
|
||||
Log.d(TAG, "iteration with quality " + quality + " size " + (bytes.length / 1024) + "kb");
|
||||
if (quality == MIN_COMPRESSION_QUALITY) break;
|
||||
|
||||
int nextQuality = (int)Math.floor(quality * Math.sqrt((double)maxImageSize / bytes.length));
|
||||
@@ -103,7 +103,8 @@ public class BitmapUtil {
|
||||
throw new BitmapDecodingException("Decoding failed. Bitmap has a length of " + bytes.length + " bytes.");
|
||||
}
|
||||
|
||||
Log.w(TAG, "createScaledBytes(" + model.toString() + ") -> quality " + Math.min(quality, MAX_COMPRESSION_QUALITY) + ", " + attempts + " attempt(s)");
|
||||
Log.i(TAG, "createScaledBytes(" + model.toString() + ") -> quality " + Math.min(quality, MAX_COMPRESSION_QUALITY) + ", " + attempts + " attempt(s)");
|
||||
|
||||
return new ScaleResult(bytes, scaledBitmap.getWidth(), scaledBitmap.getHeight());
|
||||
} finally {
|
||||
if (scaledBitmap != null) scaledBitmap.recycle();
|
||||
|
||||
Reference in New Issue
Block a user