Deprecate one-arg getDrawableForDensity, update currents.txt
BUG: 18579576
Change-Id: I7df6ec2952ab121e2be8ae0a016ccf36f6fba2ff
diff --git a/api/current.txt b/api/current.txt
index bbfbafd..53aa4a2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -9214,9 +9214,9 @@
method public int getDimensionPixelOffset(int) throws android.content.res.Resources.NotFoundException;
method public int getDimensionPixelSize(int) throws android.content.res.Resources.NotFoundException;
method public android.util.DisplayMetrics getDisplayMetrics();
- method public android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException;
+ method public deprecated android.graphics.drawable.Drawable getDrawable(int) throws android.content.res.Resources.NotFoundException;
method public android.graphics.drawable.Drawable getDrawable(int, android.content.res.Resources.Theme) throws android.content.res.Resources.NotFoundException;
- method public android.graphics.drawable.Drawable getDrawableForDensity(int, int) throws android.content.res.Resources.NotFoundException;
+ method public deprecated android.graphics.drawable.Drawable getDrawableForDensity(int, int) throws android.content.res.Resources.NotFoundException;
method public android.graphics.drawable.Drawable getDrawableForDensity(int, int, android.content.res.Resources.Theme);
method public float getFraction(int, int, int);
method public int getIdentifier(java.lang.String, java.lang.String, java.lang.String);
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index a359c31..73913b6 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -817,7 +817,10 @@
* @throws NotFoundException Throws NotFoundException if the given ID does
* not exist.
* @see #getDrawableForDensity(int, int, Theme)
+ * @deprecated Use {@link #getDrawableForDensity(int, int, Theme)} instead.
*/
+ @Deprecated
+ @Nullable
public Drawable getDrawableForDensity(int id, int density) throws NotFoundException {
return getDrawableForDensity(id, density, null);
}
@@ -836,6 +839,7 @@
* @throws NotFoundException Throws NotFoundException if the given ID does
* not exist.
*/
+ @Nullable
public Drawable getDrawableForDensity(int id, int density, @Nullable Theme theme) {
TypedValue value;
synchronized (mAccessLock) {