diff options
author | Aurimas Liutikas <aurimas@google.com> | 2018-08-22 12:55:04 -0700 |
---|---|---|
committer | Aurimas Liutikas <aurimas@google.com> | 2018-08-22 13:13:07 -0700 |
commit | f0764b5c46ae69210baeed28d2523f7f26ff8811 (patch) | |
tree | 8de55088f845936e1f6c65a0db650c83f760fcbb | |
parent | 78567088a85008825009df4d9b858e7e070e0a6d (diff) |
Deprecate Resources#getMovie()
Movie class has been deprecated, deprecate the getMovie as well.
Bug: 113054577
Test: None
Change-Id: Ic217adc002c7cfbe795e855689af1a58447b7d39
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | core/java/android/content/res/Resources.java | 4 | ||||
-rw-r--r-- | graphics/java/android/graphics/Movie.java | 1 | ||||
-rw-r--r-- | test-mock/api/current.txt | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt index fc595ac49a2c..0f38eeb1e414 100644 --- a/api/current.txt +++ b/api/current.txt @@ -11922,7 +11922,7 @@ package android.content.res { method public int[] getIntArray(int) throws android.content.res.Resources.NotFoundException; method public int getInteger(int) throws android.content.res.Resources.NotFoundException; method public android.content.res.XmlResourceParser getLayout(int) throws android.content.res.Resources.NotFoundException; - method public android.graphics.Movie getMovie(int) throws android.content.res.Resources.NotFoundException; + method public deprecated android.graphics.Movie getMovie(int) throws android.content.res.Resources.NotFoundException; method public java.lang.String getQuantityString(int, int, java.lang.Object...) throws android.content.res.Resources.NotFoundException; method public java.lang.String getQuantityString(int, int) throws android.content.res.Resources.NotFoundException; method public java.lang.CharSequence getQuantityText(int, int) throws android.content.res.Resources.NotFoundException; diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index cd250b8c016e..43e1612298fd 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -916,8 +916,10 @@ public class Resources { * tool. This integer encodes the package, type, and resource * entry. The value 0 is an invalid identifier. * @throws NotFoundException Throws NotFoundException if the given ID does not exist. - * + * + * @deprecated Prefer {@link android.graphics.drawable.AnimatedImageDrawable}. */ + @Deprecated public Movie getMovie(@RawRes int id) throws NotFoundException { final InputStream is = openRawResource(id); final Movie movie = Movie.decodeStream(is); diff --git a/graphics/java/android/graphics/Movie.java b/graphics/java/android/graphics/Movie.java index 4c953b5397e0..8162544273f4 100644 --- a/graphics/java/android/graphics/Movie.java +++ b/graphics/java/android/graphics/Movie.java @@ -25,6 +25,7 @@ import java.io.InputStream; /** * @deprecated Prefer {@link android.graphics.drawable.AnimatedImageDrawable}. */ +@Deprecated public class Movie { @UnsupportedAppUsage private long mNativeMovie; diff --git a/test-mock/api/current.txt b/test-mock/api/current.txt index f3b253c0f460..fc9b4c6831e8 100644 --- a/test-mock/api/current.txt +++ b/test-mock/api/current.txt @@ -292,6 +292,7 @@ package android.test.mock { method public int getColor(int) throws android.content.res.Resources.NotFoundException; method public android.content.res.ColorStateList getColorStateList(int) throws android.content.res.Resources.NotFoundException; method public android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException; + method public android.graphics.Movie getMovie(int) throws android.content.res.Resources.NotFoundException; method public void updateConfiguration(android.content.res.Configuration, android.util.DisplayMetrics); } |