am 6c23ba0d: am a6779bc5: am 9a888816: Merge "Deprecate one-arg getDrawableForDensity, update currents.txt" into lmp-mr1-dev
* commit '6c23ba0d8d39aed98197071c7cf9ffc0b6c633b5':
Deprecate one-arg getDrawableForDensity, update currents.txt
diff --git a/api/current.txt b/api/current.txt
index d8f3c50..9b3cb6b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -9215,9 +9215,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) {