Loading api/current.txt +2 −7 Original line number Diff line number Diff line Loading @@ -11272,14 +11272,11 @@ package android.graphics.drawable { method public static android.graphics.drawable.Drawable createFromPath(java.lang.String); method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String); method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.graphics.BitmapFactory.Options); method public static android.graphics.drawable.Drawable createFromResourceStreamThemed(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromResourceStreamThemed(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.graphics.BitmapFactory.Options, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromStream(java.io.InputStream, java.lang.String); method public static android.graphics.drawable.Drawable createFromStreamThemed(java.io.InputStream, java.lang.String, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInnerThemed(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlThemed(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public abstract void draw(android.graphics.Canvas); method public int getAlpha(); method public final android.graphics.Rect getBounds(); Loading Loading @@ -11555,7 +11552,6 @@ package android.graphics.drawable { method public android.graphics.Paint getPaint(); method public android.graphics.drawable.ShapeDrawable.ShaderFactory getShaderFactory(); method public android.graphics.drawable.shapes.Shape getShape(); method public android.content.res.ColorStateList getTint(); method protected boolean inflateTag(java.lang.String, android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet); method protected void onDraw(android.graphics.drawable.shapes.Shape, android.graphics.Canvas, android.graphics.Paint); method public void setAlpha(int); Loading @@ -11566,7 +11562,6 @@ package android.graphics.drawable { method public void setPadding(android.graphics.Rect); method public void setShaderFactory(android.graphics.drawable.ShapeDrawable.ShaderFactory); method public void setShape(android.graphics.drawable.shapes.Shape); method public void setTint(android.content.res.ColorStateList); } public static abstract class ShapeDrawable.ShaderFactory { core/java/android/content/res/Resources.java +15 −3 Original line number Diff line number Diff line Loading @@ -702,12 +702,17 @@ public class Resources { * Context.obtainStyledAttributes} with * an array containing the resource ID of interest to create the TypedArray.</p> * * <p class="note"><strong>Note:</strong> To obtain a themed drawable, use * {@link android.content.Context#getDrawable(int) Context.getDrawable(int)} * or {@link #getDrawable(int, Theme)} passing the desired theme.</p> * * @param id The desired resource identifier, as generated by the aapt * tool. This integer encodes the package, type, and resource * entry. The value 0 is an invalid identifier. * @return Drawable An object that can be used to draw this resource. * @throws NotFoundException Throws NotFoundException if the given ID does * not exist. * @see #getDrawable(int, Theme) */ public Drawable getDrawable(int id) throws NotFoundException { return getDrawable(id, null); Loading @@ -715,7 +720,9 @@ public class Resources { /** * Return a drawable object associated with a particular resource ID and * styled for the specified theme. * styled for the specified theme. Various types of objects will be * returned depending on the underlying resource -- for example, a solid * color, PNG image, scalable image, etc. * * @param id The desired resource identifier, as generated by the aapt * tool. This integer encodes the package, type, and resource Loading Loading @@ -755,6 +762,11 @@ public class Resources { * image, scalable image, etc. The Drawable API hides these implementation * details. * * <p class="note"><strong>Note:</strong> To obtain a themed drawable, use * {@link android.content.Context#getDrawable(int) Context.getDrawable(int)} * or {@link #getDrawableForDensity(int, int, Theme)} passing the desired * theme.</p> * * @param id The desired resource identifier, as generated by the aapt tool. * This integer encodes the package, type, and resource entry. * The value 0 is an invalid identifier. Loading Loading @@ -2340,12 +2352,12 @@ public class Resources { if (file.endsWith(".xml")) { final XmlResourceParser rp = loadXmlResourceParser( file, id, value.assetCookie, "drawable"); dr = Drawable.createFromXmlThemed(this, rp, theme); dr = Drawable.createFromXml(this, rp, theme); rp.close(); } else { final InputStream is = mAssets.openNonAsset( value.assetCookie, file, AssetManager.ACCESS_STREAMING); dr = Drawable.createFromResourceStreamThemed(this, value, is, file, null, theme); dr = Drawable.createFromResourceStream(this, value, is, file, null); is.close(); } } catch (Exception e) { Loading core/java/android/widget/ImageView.java +1 −1 Original line number Diff line number Diff line Loading @@ -664,7 +664,7 @@ public class ImageView extends View { InputStream stream = null; try { stream = mContext.getContentResolver().openInputStream(mUri); d = Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); d = Drawable.createFromStream(stream, null); } catch (Exception e) { Log.w("ImageView", "Unable to open content: " + mUri, e); } finally { Loading core/java/android/widget/ProgressBar.java +2 −3 Original line number Diff line number Diff line Loading @@ -357,9 +357,8 @@ public class ProgressBar extends View { Shader.TileMode.REPEAT, Shader.TileMode.CLAMP); shapeDrawable.getPaint().setShader(bitmapShader); // Ensure the color filter and tint are propagated. shapeDrawable.setTint(bitmap.getTint()); shapeDrawable.setTintMode(bitmap.getTintMode()); // Ensure the tint and filter are propagated in the correct order. shapeDrawable.setTint(bitmap.getTint(), bitmap.getTintMode()); shapeDrawable.setColorFilter(bitmap.getColorFilter()); return clip ? new ClipDrawable( Loading core/java/android/widget/SuggestionsAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter implements OnClickListene throw new FileNotFoundException("Failed to open " + uri); } try { return Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); return Drawable.createFromStream(stream, null); } finally { try { stream.close(); Loading Loading
api/current.txt +2 −7 Original line number Diff line number Diff line Loading @@ -11272,14 +11272,11 @@ package android.graphics.drawable { method public static android.graphics.drawable.Drawable createFromPath(java.lang.String); method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String); method public static android.graphics.drawable.Drawable createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.graphics.BitmapFactory.Options); method public static android.graphics.drawable.Drawable createFromResourceStreamThemed(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromResourceStreamThemed(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String, android.graphics.BitmapFactory.Options, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromStream(java.io.InputStream, java.lang.String); method public static android.graphics.drawable.Drawable createFromStreamThemed(java.io.InputStream, java.lang.String, android.content.res.Resources.Theme); method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInnerThemed(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlThemed(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public static android.graphics.drawable.Drawable createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public abstract void draw(android.graphics.Canvas); method public int getAlpha(); method public final android.graphics.Rect getBounds(); Loading Loading @@ -11555,7 +11552,6 @@ package android.graphics.drawable { method public android.graphics.Paint getPaint(); method public android.graphics.drawable.ShapeDrawable.ShaderFactory getShaderFactory(); method public android.graphics.drawable.shapes.Shape getShape(); method public android.content.res.ColorStateList getTint(); method protected boolean inflateTag(java.lang.String, android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet); method protected void onDraw(android.graphics.drawable.shapes.Shape, android.graphics.Canvas, android.graphics.Paint); method public void setAlpha(int); Loading @@ -11566,7 +11562,6 @@ package android.graphics.drawable { method public void setPadding(android.graphics.Rect); method public void setShaderFactory(android.graphics.drawable.ShapeDrawable.ShaderFactory); method public void setShape(android.graphics.drawable.shapes.Shape); method public void setTint(android.content.res.ColorStateList); } public static abstract class ShapeDrawable.ShaderFactory {
core/java/android/content/res/Resources.java +15 −3 Original line number Diff line number Diff line Loading @@ -702,12 +702,17 @@ public class Resources { * Context.obtainStyledAttributes} with * an array containing the resource ID of interest to create the TypedArray.</p> * * <p class="note"><strong>Note:</strong> To obtain a themed drawable, use * {@link android.content.Context#getDrawable(int) Context.getDrawable(int)} * or {@link #getDrawable(int, Theme)} passing the desired theme.</p> * * @param id The desired resource identifier, as generated by the aapt * tool. This integer encodes the package, type, and resource * entry. The value 0 is an invalid identifier. * @return Drawable An object that can be used to draw this resource. * @throws NotFoundException Throws NotFoundException if the given ID does * not exist. * @see #getDrawable(int, Theme) */ public Drawable getDrawable(int id) throws NotFoundException { return getDrawable(id, null); Loading @@ -715,7 +720,9 @@ public class Resources { /** * Return a drawable object associated with a particular resource ID and * styled for the specified theme. * styled for the specified theme. Various types of objects will be * returned depending on the underlying resource -- for example, a solid * color, PNG image, scalable image, etc. * * @param id The desired resource identifier, as generated by the aapt * tool. This integer encodes the package, type, and resource Loading Loading @@ -755,6 +762,11 @@ public class Resources { * image, scalable image, etc. The Drawable API hides these implementation * details. * * <p class="note"><strong>Note:</strong> To obtain a themed drawable, use * {@link android.content.Context#getDrawable(int) Context.getDrawable(int)} * or {@link #getDrawableForDensity(int, int, Theme)} passing the desired * theme.</p> * * @param id The desired resource identifier, as generated by the aapt tool. * This integer encodes the package, type, and resource entry. * The value 0 is an invalid identifier. Loading Loading @@ -2340,12 +2352,12 @@ public class Resources { if (file.endsWith(".xml")) { final XmlResourceParser rp = loadXmlResourceParser( file, id, value.assetCookie, "drawable"); dr = Drawable.createFromXmlThemed(this, rp, theme); dr = Drawable.createFromXml(this, rp, theme); rp.close(); } else { final InputStream is = mAssets.openNonAsset( value.assetCookie, file, AssetManager.ACCESS_STREAMING); dr = Drawable.createFromResourceStreamThemed(this, value, is, file, null, theme); dr = Drawable.createFromResourceStream(this, value, is, file, null); is.close(); } } catch (Exception e) { Loading
core/java/android/widget/ImageView.java +1 −1 Original line number Diff line number Diff line Loading @@ -664,7 +664,7 @@ public class ImageView extends View { InputStream stream = null; try { stream = mContext.getContentResolver().openInputStream(mUri); d = Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); d = Drawable.createFromStream(stream, null); } catch (Exception e) { Log.w("ImageView", "Unable to open content: " + mUri, e); } finally { Loading
core/java/android/widget/ProgressBar.java +2 −3 Original line number Diff line number Diff line Loading @@ -357,9 +357,8 @@ public class ProgressBar extends View { Shader.TileMode.REPEAT, Shader.TileMode.CLAMP); shapeDrawable.getPaint().setShader(bitmapShader); // Ensure the color filter and tint are propagated. shapeDrawable.setTint(bitmap.getTint()); shapeDrawable.setTintMode(bitmap.getTintMode()); // Ensure the tint and filter are propagated in the correct order. shapeDrawable.setTint(bitmap.getTint(), bitmap.getTintMode()); shapeDrawable.setColorFilter(bitmap.getColorFilter()); return clip ? new ClipDrawable( Loading
core/java/android/widget/SuggestionsAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter implements OnClickListene throw new FileNotFoundException("Failed to open " + uri); } try { return Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); return Drawable.createFromStream(stream, null); } finally { try { stream.close(); Loading