Rename ImageDecoder.ERRORs
Bug: 73788969
Test: I501e8b76aacd785cb994165ab01dc1b39fea3a1c
Move them into ImageDecoder.DecodeException, which is where they are
actually used. This also provides some more context, so that the prefix
"ERROR_" is no longer necessary, fixing the redundancy/awkwardness in
ERROR_SOURCE_ERROR. Further rename that to SOURCE_MALFORMED_DATA, which
is more descriptive, and does not imply a Java Error.
Change-Id: Ied17ad343650f9c33d9a35b0f9d00ccc22264bd6
diff --git a/api/current.txt b/api/current.txt
index 854df47..de27da0 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -13650,14 +13650,14 @@
field public static final int ALLOCATOR_HARDWARE = 3; // 0x3
field public static final int ALLOCATOR_SHARED_MEMORY = 2; // 0x2
field public static final int ALLOCATOR_SOFTWARE = 1; // 0x1
- field public static final int ERROR_SOURCE_ERROR = 3; // 0x3
- field public static final int ERROR_SOURCE_EXCEPTION = 1; // 0x1
- field public static final int ERROR_SOURCE_INCOMPLETE = 2; // 0x2
}
public static final class ImageDecoder.DecodeException extends java.io.IOException {
method public int getError();
method public android.graphics.ImageDecoder.Source getSource();
+ field public static final int SOURCE_EXCEPTION = 1; // 0x1
+ field public static final int SOURCE_INCOMPLETE = 2; // 0x2
+ field public static final int SOURCE_MALFORMED_DATA = 3; // 0x3
}
public static class ImageDecoder.ImageInfo {
diff --git a/api/removed.txt b/api/removed.txt
index 7bbf376..1228fd1 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -155,6 +155,9 @@
public final class ImageDecoder implements java.lang.AutoCloseable {
method public deprecated boolean getAsAlphaMask();
method public deprecated android.graphics.ImageDecoder setAsAlphaMask(boolean);
+ field public static final deprecated int ERROR_SOURCE_ERROR = 3; // 0x3
+ field public static final deprecated int ERROR_SOURCE_EXCEPTION = 1; // 0x1
+ field public static final deprecated int ERROR_SOURCE_INCOMPLETE = 2; // 0x2
}
public static deprecated class ImageDecoder.IncompleteException extends java.io.IOException {