Messaging: Remove compatibility for old android versions

Change-Id: Id9065d60525a509271a0e64c0e349e857cb998e2
This commit is contained in:
Michael W
2024-12-07 21:02:44 +01:00
parent 9bbc7a8f99
commit 7c55a6d56a
104 changed files with 580 additions and 2306 deletions

View File

@@ -37,11 +37,9 @@ import com.android.messaging.Factory;
import com.android.messaging.datamodel.data.MessageData;
import com.android.messaging.datamodel.media.VideoThumbnailRequest;
import com.android.messaging.mmslib.pdu.CharacterSets;
import com.android.messaging.util.Assert;
import com.android.messaging.util.ContentType;
import com.android.messaging.util.LogUtil;
import com.android.messaging.util.MediaMetadataRetrieverWrapper;
import com.android.messaging.util.OsUtil;
import com.android.messaging.util.PhoneUtils;
import com.google.common.collect.Lists;
@@ -120,12 +118,6 @@ public class DatabaseMessages {
if (!MmsUtils.hasSmsDateSentColumn()) {
projection[INDEX_DATE_SENT] = Sms.DATE;
}
if (!OsUtil.isAtLeastL_MR1()) {
Assert.equals(INDEX_SUB_ID, projection.length - 1);
String[] withoutSubId = new String[projection.length - 1];
System.arraycopy(projection, 0, withoutSubId, 0, withoutSubId.length);
projection = withoutSubId;
}
sProjection = projection;
}
@@ -307,13 +299,6 @@ public class DatabaseMessages {
Mms.SUBSCRIPTION_ID,
};
if (!OsUtil.isAtLeastL_MR1()) {
Assert.equals(INDEX_SUB_ID, projection.length - 1);
String[] withoutSubId = new String[projection.length - 1];
System.arraycopy(projection, 0, withoutSubId, 0, withoutSubId.length);
projection = withoutSubId;
}
sProjection = projection;
}
@@ -722,11 +707,6 @@ public class DatabaseMessages {
* Load video file of a video part and parse the dimensions and type
*/
private void loadVideo() {
// This is a coarse check, and should not be applied to outgoing messages. However,
// currently, this does not cause any problems.
if (!VideoThumbnailRequest.shouldShowIncomingVideoThumbnails()) {
return;
}
final Uri uri = getDataUri();
final MediaMetadataRetrieverWrapper retriever = new MediaMetadataRetrieverWrapper();
try {