Messaging: Remove compatibility for old android versions
Change-Id: Id9065d60525a509271a0e64c0e349e857cb998e2
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.
|
||||
@@ -24,7 +25,6 @@ import com.android.messaging.util.Assert;
|
||||
import com.android.messaging.util.Assert.DoesNotRunOnMainThread;
|
||||
import com.android.messaging.util.ImageUtils;
|
||||
import com.android.messaging.util.LogUtil;
|
||||
import com.android.messaging.util.OsUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -109,11 +109,7 @@ public class DecodedImageResource extends ImageResource {
|
||||
acquireLock();
|
||||
try {
|
||||
Assert.notNull(mBitmap);
|
||||
if (OsUtil.isAtLeastKLP()) {
|
||||
return mBitmap.getAllocationByteCount();
|
||||
} else {
|
||||
return mBitmap.getRowBytes() * mBitmap.getHeight();
|
||||
}
|
||||
return mBitmap.getAllocationByteCount();
|
||||
} finally {
|
||||
releaseLock();
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -20,7 +21,6 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import com.android.messaging.util.MediaMetadataRetrieverWrapper;
|
||||
import com.android.messaging.util.MediaUtil;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@@ -28,7 +28,6 @@ import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* Class to request a video thumbnail.
|
||||
* Users of this class as responsible for checking {@link #shouldShowIncomingVideoThumbnails}
|
||||
*/
|
||||
public class VideoThumbnailRequest extends ImageRequest<UriImageRequestDescriptor> {
|
||||
|
||||
@@ -37,10 +36,6 @@ public class VideoThumbnailRequest extends ImageRequest<UriImageRequestDescripto
|
||||
super(context, descriptor);
|
||||
}
|
||||
|
||||
public static boolean shouldShowIncomingVideoThumbnails() {
|
||||
return MediaUtil.canAutoAccessIncomingMedia();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInputStreamForResource() throws FileNotFoundException {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user