Loading api/current.xml +37 −0 Original line number Diff line number Diff line Loading @@ -63348,6 +63348,16 @@ <parameter name="bitmap" type="android.graphics.Bitmap"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="filepath" type="java.lang.String"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" Loading @@ -63355,9 +63365,21 @@ deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> <parameter name="filepath" type="java.lang.String"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="is" type="java.io.InputStream"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" Loading @@ -63365,6 +63387,8 @@ deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> <parameter name="is" type="java.io.InputStream"> </parameter> </constructor> Loading Loading @@ -64543,6 +64567,19 @@ visibility="public" > </method> <method name="newDrawable" return="android.graphics.drawable.Drawable" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> </method> </class> <class name="DrawableContainer" extends="android.graphics.drawable.Drawable" core/java/android/app/SuggestionsAdapter.java +3 −3 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Drawable.ConstantState cachedBg = mBackgroundsCache.get(backgroundColor); if (cachedBg != null) { if (DBG) Log.d(LOG_TAG, "Background cache hit for color " + backgroundColor); return cachedBg.newDrawable(); return cachedBg.newDrawable(mProviderContext.getResources()); } if (DBG) Log.d(LOG_TAG, "Creating new background for color " + backgroundColor); ColorDrawable transparent = new ColorDrawable(0); Loading Loading @@ -572,7 +572,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Drawable.ConstantState cached = mOutsideDrawablesCache.get(drawableId); if (cached != null) { if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId); return cached.newDrawable(); return cached.newDrawable(mProviderContext.getResources()); } Drawable drawable = null; Loading Loading @@ -663,7 +663,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { // Using containsKey() since we also store null values. if (mOutsideDrawablesCache.containsKey(componentIconKey)) { Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey); return cached == null ? null : cached.newDrawable(); return cached == null ? null : cached.newDrawable(mProviderContext.getResources()); } // Then try the activity or application icon Drawable drawable = getActivityIcon(component); Loading core/java/android/content/res/Resources.java +2 −2 Original line number Diff line number Diff line Loading @@ -1662,7 +1662,7 @@ public class Resources { Drawable.ConstantState cs = sPreloadedDrawables.get(key); if (cs != null) { dr = cs.newDrawable(); dr = cs.newDrawable(this); } else { if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT && value.type <= TypedValue.TYPE_LAST_COLOR_INT) { Loading Loading @@ -1743,7 +1743,7 @@ public class Resources { //Log.i(TAG, "Returning cached drawable @ #" + // Integer.toHexString(((Integer)key).intValue()) // + " in " + this + ": " + entry); return entry.newDrawable(); return entry.newDrawable(this); } else { // our entry has been purged mDrawableCache.delete(key); Loading core/java/com/android/internal/view/menu/IconMenuView.java +3 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,9 @@ public final class IconMenuView extends ViewGroup implements ItemInvoker, MenuVi itemView.setIconMenuView(this); // Apply the background to the item view itemView.setBackgroundDrawable(mItemBackground.getConstantState().newDrawable()); itemView.setBackgroundDrawable( mItemBackground.getConstantState().newDrawable( getContext().getResources())); // This class is the invoker for all its item views itemView.setItemInvoker(this); Loading graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java +16 −6 Original line number Diff line number Diff line Loading @@ -45,11 +45,11 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac private boolean mRunning; public AnimatedRotateDrawable() { this(null); this(null, null); } private AnimatedRotateDrawable(AnimatedRotateState rotateState) { mState = new AnimatedRotateState(rotateState, this); private AnimatedRotateDrawable(AnimatedRotateState rotateState, Resources res) { mState = new AnimatedRotateState(rotateState, this, res); init(); } Loading Loading @@ -296,9 +296,14 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac private boolean mCanConstantState; private boolean mCheckedConstantState; public AnimatedRotateState(AnimatedRotateState source, AnimatedRotateDrawable owner) { public AnimatedRotateState(AnimatedRotateState source, AnimatedRotateDrawable owner, Resources res) { if (source != null) { if (res != null) { mDrawable = source.mDrawable.getConstantState().newDrawable(res); } else { mDrawable = source.mDrawable.getConstantState().newDrawable(); } mDrawable.setCallback(owner); mPivotXRel = source.mPivotXRel; mPivotX = source.mPivotX; Loading @@ -312,7 +317,12 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac @Override public Drawable newDrawable() { return new AnimatedRotateDrawable(this); return new AnimatedRotateDrawable(this, null); } @Override public Drawable newDrawable(Resources res) { return new AnimatedRotateDrawable(this, res); } @Override Loading Loading
api/current.xml +37 −0 Original line number Diff line number Diff line Loading @@ -63348,6 +63348,16 @@ <parameter name="bitmap" type="android.graphics.Bitmap"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="filepath" type="java.lang.String"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" Loading @@ -63355,9 +63365,21 @@ deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> <parameter name="filepath" type="java.lang.String"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="is" type="java.io.InputStream"> </parameter> </constructor> <constructor name="BitmapDrawable" type="android.graphics.drawable.BitmapDrawable" static="false" Loading @@ -63365,6 +63387,8 @@ deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> <parameter name="is" type="java.io.InputStream"> </parameter> </constructor> Loading Loading @@ -64543,6 +64567,19 @@ visibility="public" > </method> <method name="newDrawable" return="android.graphics.drawable.Drawable" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="res" type="android.content.res.Resources"> </parameter> </method> </class> <class name="DrawableContainer" extends="android.graphics.drawable.Drawable"
core/java/android/app/SuggestionsAdapter.java +3 −3 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Drawable.ConstantState cachedBg = mBackgroundsCache.get(backgroundColor); if (cachedBg != null) { if (DBG) Log.d(LOG_TAG, "Background cache hit for color " + backgroundColor); return cachedBg.newDrawable(); return cachedBg.newDrawable(mProviderContext.getResources()); } if (DBG) Log.d(LOG_TAG, "Creating new background for color " + backgroundColor); ColorDrawable transparent = new ColorDrawable(0); Loading Loading @@ -572,7 +572,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Drawable.ConstantState cached = mOutsideDrawablesCache.get(drawableId); if (cached != null) { if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId); return cached.newDrawable(); return cached.newDrawable(mProviderContext.getResources()); } Drawable drawable = null; Loading Loading @@ -663,7 +663,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { // Using containsKey() since we also store null values. if (mOutsideDrawablesCache.containsKey(componentIconKey)) { Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey); return cached == null ? null : cached.newDrawable(); return cached == null ? null : cached.newDrawable(mProviderContext.getResources()); } // Then try the activity or application icon Drawable drawable = getActivityIcon(component); Loading
core/java/android/content/res/Resources.java +2 −2 Original line number Diff line number Diff line Loading @@ -1662,7 +1662,7 @@ public class Resources { Drawable.ConstantState cs = sPreloadedDrawables.get(key); if (cs != null) { dr = cs.newDrawable(); dr = cs.newDrawable(this); } else { if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT && value.type <= TypedValue.TYPE_LAST_COLOR_INT) { Loading Loading @@ -1743,7 +1743,7 @@ public class Resources { //Log.i(TAG, "Returning cached drawable @ #" + // Integer.toHexString(((Integer)key).intValue()) // + " in " + this + ": " + entry); return entry.newDrawable(); return entry.newDrawable(this); } else { // our entry has been purged mDrawableCache.delete(key); Loading
core/java/com/android/internal/view/menu/IconMenuView.java +3 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,9 @@ public final class IconMenuView extends ViewGroup implements ItemInvoker, MenuVi itemView.setIconMenuView(this); // Apply the background to the item view itemView.setBackgroundDrawable(mItemBackground.getConstantState().newDrawable()); itemView.setBackgroundDrawable( mItemBackground.getConstantState().newDrawable( getContext().getResources())); // This class is the invoker for all its item views itemView.setItemInvoker(this); Loading
graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java +16 −6 Original line number Diff line number Diff line Loading @@ -45,11 +45,11 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac private boolean mRunning; public AnimatedRotateDrawable() { this(null); this(null, null); } private AnimatedRotateDrawable(AnimatedRotateState rotateState) { mState = new AnimatedRotateState(rotateState, this); private AnimatedRotateDrawable(AnimatedRotateState rotateState, Resources res) { mState = new AnimatedRotateState(rotateState, this, res); init(); } Loading Loading @@ -296,9 +296,14 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac private boolean mCanConstantState; private boolean mCheckedConstantState; public AnimatedRotateState(AnimatedRotateState source, AnimatedRotateDrawable owner) { public AnimatedRotateState(AnimatedRotateState source, AnimatedRotateDrawable owner, Resources res) { if (source != null) { if (res != null) { mDrawable = source.mDrawable.getConstantState().newDrawable(res); } else { mDrawable = source.mDrawable.getConstantState().newDrawable(); } mDrawable.setCallback(owner); mPivotXRel = source.mPivotXRel; mPivotX = source.mPivotX; Loading @@ -312,7 +317,12 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac @Override public Drawable newDrawable() { return new AnimatedRotateDrawable(this); return new AnimatedRotateDrawable(this, null); } @Override public Drawable newDrawable(Resources res) { return new AnimatedRotateDrawable(this, res); } @Override Loading