зеркало из https://github.com/mozilla/gecko-dev.git
Bug 921557 - (Part 2) Update other deprecated BitmapDrawable constructor usage. r=wesj
This commit is contained in:
Родитель
8f6f3e7a0a
Коммит
0f0fd043d8
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче