summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Miranda Kephart <mkephart@google.com> 2020-12-16 14:01:12 -0500
committer Miranda Kephart <mkephart@google.com> 2020-12-16 14:39:11 -0500
commite1a22b9237cbab23fd461ba9cd8b9c294a5462ff (patch)
treee4de65bc4c51af2d3d5f7fae354b23d03d8cf24b
parent386efd4b9060e090440237e976af2b76db2c5b34 (diff)
Fix screenshot exif attributes
Update to using the androidx support library for exif data. Also update the error notification since failing to save isn't always caused by limited storage space. Test: manual Bug: 173543930 Fix: 173543930 Change-Id: I31ca5ac30eadc5b2ff781784c3c0f0f9ac6c586f
-rw-r--r--packages/SystemUI/Android.bp2
-rw-r--r--packages/SystemUI/res/values/strings.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java5
3 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 2ea0c2294f76..fda1e3641daa 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -74,6 +74,7 @@ android_library {
"androidx.lifecycle_lifecycle-extensions",
"androidx.dynamicanimation_dynamicanimation",
"androidx-constraintlayout_constraintlayout",
+ "androidx.exifinterface_exifinterface",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"iconloader_base",
@@ -140,6 +141,7 @@ android_library {
"androidx.lifecycle_lifecycle-extensions",
"androidx.dynamicanimation_dynamicanimation",
"androidx-constraintlayout_constraintlayout",
+ "androidx.exifinterface_exifinterface",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"iconloader_base",
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 6fa4aa116aa4..5435a1513750 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -231,7 +231,7 @@
<!-- Notification text displayed when we fail to save a screenshot for unknown reasons. [CHAR LIMIT=100] -->
<string name="screenshot_failed_to_save_unknown_text">Try taking screenshot again</string>
<!-- Notification text displayed when we fail to save a screenshot. [CHAR LIMIT=100] -->
- <string name="screenshot_failed_to_save_text">Can\'t save screenshot due to limited storage space</string>
+ <string name="screenshot_failed_to_save_text">Can\'t save screenshot</string>
<!-- Notification text displayed when we fail to take a screenshot. [CHAR LIMIT=100] -->
<string name="screenshot_failed_to_capture_text">Taking screenshots isn\'t allowed by the app or
your organization</string>
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
index f4ce77acb8ec..ab716027f932 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
@@ -34,7 +34,6 @@ import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.Icon;
-import android.media.ExifInterface;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
@@ -52,6 +51,8 @@ import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.Log;
+import androidx.exifinterface.media.ExifInterface;
+
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
import com.android.systemui.R;
@@ -78,7 +79,7 @@ import java.util.concurrent.CompletableFuture;
/**
* An AsyncTask that saves an image to the media store in the background.
*/
-class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
+class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
private static final String TAG = logTag(SaveImageInBackgroundTask.class);
private static final String SCREENSHOT_FILE_NAME_TEMPLATE = "Screenshot_%s.png";