mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 921557 - (Part 2) Update other deprecated BitmapDrawable constructor usage. r=wesj
This commit is contained in:
parent
cfc70b6eeb
commit
44fc6c5d5d
@ -207,7 +207,7 @@ public class Tab {
|
||||
public void run() {
|
||||
if (b != null) {
|
||||
try {
|
||||
mThumbnail = new BitmapDrawable(b);
|
||||
mThumbnail = new BitmapDrawable(mAppContext.getResources(), b);
|
||||
if (mState == Tab.STATE_SUCCESS)
|
||||
saveThumbnailToDB();
|
||||
} catch (OutOfMemoryError oom) {
|
||||
|
@ -193,7 +193,7 @@ public class SearchEnginePreference extends Preference implements View.OnLongCli
|
||||
// Copy the icon from this object to the prompt we produce. We lazily create the drawable,
|
||||
// as the user may not ever actually tap this object.
|
||||
if (mPromptIcon == null && mIconBitmap != null) {
|
||||
mPromptIcon = new BitmapDrawable(mFaviconView.getBitmap());
|
||||
mPromptIcon = new BitmapDrawable(getContext().getResources(), mFaviconView.getBitmap());
|
||||
}
|
||||
|
||||
// Icons are hidden until Bug 926711 is fixed.
|
||||
|
@ -586,7 +586,7 @@ public class Prompt implements OnClickListener, OnCancelListener, OnItemClickLis
|
||||
// We want the icon to be of a specific size. Some do not
|
||||
// follow this rule so we have to resize them.
|
||||
Bitmap bitmap = ((BitmapDrawable) item.icon).getBitmap();
|
||||
d = new BitmapDrawable(Bitmap.createScaledBitmap(bitmap, mIconSize, mIconSize, true));
|
||||
d = new BitmapDrawable(res, Bitmap.createScaledBitmap(bitmap, mIconSize, mIconSize, true));
|
||||
} else if (item.inGroup) {
|
||||
// We don't currently support "indenting" items with icons
|
||||
d = getBlankDrawable(res);
|
||||
|
Loading…
Reference in New Issue
Block a user