diff --git a/Android.bp b/Android.bp index 9982616..75e887a 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,5 @@ // 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. @@ -61,6 +62,7 @@ android_app { "androidx.appcompat_appcompat", "androidx.collection_collection", "androidx.core_core", + "androidx.exifinterface_exifinterface", "androidx.fragment_fragment", "androidx.media_media", "androidx.legacy_legacy-support-core-utils", diff --git a/src/com/android/messaging/datamodel/media/AvatarRequest.java b/src/com/android/messaging/datamodel/media/AvatarRequest.java index 667407d..9310321 100644 --- a/src/com/android/messaging/datamodel/media/AvatarRequest.java +++ b/src/com/android/messaging/datamodel/media/AvatarRequest.java @@ -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,11 +25,11 @@ import android.graphics.Paint; import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.drawable.VectorDrawable; -import android.media.ExifInterface; import android.net.Uri; import android.text.TextUtils; import androidx.core.content.res.ResourcesCompat; +import androidx.exifinterface.media.ExifInterface; import com.android.messaging.R; import com.android.messaging.util.Assert; diff --git a/src/com/android/messaging/datamodel/media/CompositeImageRequest.java b/src/com/android/messaging/datamodel/media/CompositeImageRequest.java index 66f1bff..1509174 100644 --- a/src/com/android/messaging/datamodel/media/CompositeImageRequest.java +++ b/src/com/android/messaging/datamodel/media/CompositeImageRequest.java @@ -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. @@ -21,7 +22,8 @@ import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.RectF; -import android.media.ExifInterface; + +import androidx.exifinterface.media.ExifInterface; import com.android.messaging.util.Assert; import com.android.messaging.util.ImageUtils; diff --git a/src/com/android/messaging/datamodel/media/FileImageRequest.java b/src/com/android/messaging/datamodel/media/FileImageRequest.java index 31c053a..dc3806f 100644 --- a/src/com/android/messaging/datamodel/media/FileImageRequest.java +++ b/src/com/android/messaging/datamodel/media/FileImageRequest.java @@ -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. @@ -18,7 +19,8 @@ package com.android.messaging.datamodel.media; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.media.ExifInterface; + +import androidx.exifinterface.media.ExifInterface; import com.android.messaging.datamodel.media.PoolableImageCache.ReusableImageResourcePool; import com.android.messaging.util.ImageUtils; diff --git a/src/com/android/messaging/datamodel/media/GifImageResource.java b/src/com/android/messaging/datamodel/media/GifImageResource.java index ef43833..bff2597 100644 --- a/src/com/android/messaging/datamodel/media/GifImageResource.java +++ b/src/com/android/messaging/datamodel/media/GifImageResource.java @@ -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,8 @@ import android.graphics.Bitmap; import android.graphics.ImageDecoder; import android.graphics.drawable.AnimatedImageDrawable; import android.graphics.drawable.Drawable; -import android.media.ExifInterface; + +import androidx.exifinterface.media.ExifInterface; import com.android.messaging.util.Assert; import com.android.messaging.util.LogUtil; diff --git a/src/com/android/messaging/datamodel/media/NetworkUriImageRequest.java b/src/com/android/messaging/datamodel/media/NetworkUriImageRequest.java index 642e947..e0eb1e4 100644 --- a/src/com/android/messaging/datamodel/media/NetworkUriImageRequest.java +++ b/src/com/android/messaging/datamodel/media/NetworkUriImageRequest.java @@ -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. @@ -39,7 +40,7 @@ public class NetworkUriImageRequest extends public NetworkUriImageRequest(Context context, D descriptor) { super(context, descriptor); - mOrientation = android.media.ExifInterface.ORIENTATION_UNDEFINED; + mOrientation = androidx.exifinterface.media.ExifInterface.ORIENTATION_UNDEFINED; } @Override diff --git a/src/com/android/messaging/datamodel/media/SimSelectorAvatarRequest.java b/src/com/android/messaging/datamodel/media/SimSelectorAvatarRequest.java index e4f0334..6d61bab 100644 --- a/src/com/android/messaging/datamodel/media/SimSelectorAvatarRequest.java +++ b/src/com/android/messaging/datamodel/media/SimSelectorAvatarRequest.java @@ -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. @@ -26,9 +27,10 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; -import android.media.ExifInterface; import android.text.TextUtils; +import androidx.exifinterface.media.ExifInterface; + import com.android.messaging.R; import com.android.messaging.util.Assert; import com.android.messaging.util.AvatarUriUtil; diff --git a/src/com/android/messaging/sms/MmsUtils.java b/src/com/android/messaging/sms/MmsUtils.java index f84b80a..76e6f37 100644 --- a/src/com/android/messaging/sms/MmsUtils.java +++ b/src/com/android/messaging/sms/MmsUtils.java @@ -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. @@ -488,8 +489,8 @@ public class MmsUtils { if (imageSize <= maxPartSize && width <= widthLimit && height <= heightLimit && - (orientation == android.media.ExifInterface.ORIENTATION_UNDEFINED || - orientation == android.media.ExifInterface.ORIENTATION_NORMAL)) { + (orientation == androidx.exifinterface.media.ExifInterface.ORIENTATION_UNDEFINED || + orientation == androidx.exifinterface.media.ExifInterface.ORIENTATION_NORMAL)) { if (LogUtil.isLoggable(TAG, LogUtil.VERBOSE)) { LogUtil.v(TAG, "addPicturePart - already sized"); } diff --git a/src/com/android/messaging/ui/mediapicker/ImagePersistTask.java b/src/com/android/messaging/ui/mediapicker/ImagePersistTask.java index 637eb84..8478385 100644 --- a/src/com/android/messaging/ui/mediapicker/ImagePersistTask.java +++ b/src/com/android/messaging/ui/mediapicker/ImagePersistTask.java @@ -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. @@ -78,7 +79,7 @@ public class ImagePersistTask extends SafeAsyncTask { outputStream = mContext.getContentResolver().openOutputStream(mOutputUri); if (mHeightPercent != 1.0f) { - int orientation = android.media.ExifInterface.ORIENTATION_UNDEFINED; + int orientation = androidx.exifinterface.media.ExifInterface.ORIENTATION_UNDEFINED; final ExifInterface exifInterface = new ExifInterface(); try { exifInterface.readExif(mBytes); diff --git a/src/com/android/messaging/util/ImageUtils.java b/src/com/android/messaging/util/ImageUtils.java index 71da978..0e94016 100644 --- a/src/com/android/messaging/util/ImageUtils.java +++ b/src/com/android/messaging/util/ImageUtils.java @@ -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. @@ -254,7 +255,7 @@ public class ImageUtils { } catch (FileNotFoundException e) { LogUtil.e(TAG, "getOrientation couldn't open: " + uri, e); } - return android.media.ExifInterface.ORIENTATION_UNDEFINED; + return androidx.exifinterface.media.ExifInterface.ORIENTATION_UNDEFINED; } /** @@ -262,7 +263,7 @@ public class ImageUtils { * @return The exif orientation value for the image in the specified stream */ public static int getOrientation(final InputStream inputStream) { - int orientation = android.media.ExifInterface.ORIENTATION_UNDEFINED; + int orientation = androidx.exifinterface.media.ExifInterface.ORIENTATION_UNDEFINED; if (inputStream != null) { try { final ExifInterface exifInterface = new ExifInterface();