mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Move all Pair usage to kotlin.Pair
This commit is contained in:
@@ -11,7 +11,7 @@ import android.graphics.YuvImage;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.util.Pair;
|
||||
import kotlin.Pair;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -271,7 +271,7 @@ public class BitmapUtil {
|
||||
|
||||
public static Pair<Integer, Integer> getDimensions(InputStream inputStream) throws BitmapDecodingException {
|
||||
BitmapFactory.Options options = getImageDimensions(inputStream);
|
||||
return new Pair<>(options.outWidth, options.outHeight);
|
||||
return new Pair(options.outWidth, options.outHeight);
|
||||
}
|
||||
|
||||
public static ByteArrayInputStream toCompressedJpeg(Bitmap bitmap) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.media.ThumbnailUtils;
|
||||
import android.net.Uri;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
import kotlin.Pair;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -279,9 +279,9 @@ public class MediaUtil {
|
||||
}
|
||||
}
|
||||
if (dimens == null) {
|
||||
dimens = new Pair<>(0, 0);
|
||||
dimens = new Pair(0, 0);
|
||||
}
|
||||
Log.d(TAG, "Dimensions for [" + uri + "] are " + dimens.first + " x " + dimens.second);
|
||||
Log.d(TAG, "Dimensions for [" + uri + "] are " + dimens.getFirst() + " x " + dimens.getSecond());
|
||||
return dimens;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class FileStorage {
|
||||
|
||||
private static @NonNull OutputStream getOutputStream(@NonNull Context context, File outputFile) throws IOException {
|
||||
AttachmentSecret attachmentSecret = AttachmentSecretProvider.getInstance(context).getOrCreateAttachmentSecret();
|
||||
return ModernEncryptingPartOutputStream.createFor(attachmentSecret, outputFile, true).second;
|
||||
return ModernEncryptingPartOutputStream.createFor(attachmentSecret, outputFile, true).getSecond();
|
||||
}
|
||||
|
||||
private static @NonNull InputStream getInputStream(@NonNull Context context, File inputFile) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user