From 795b7c3cf039372c7b2ef908e04b9a8a1824c1c0 Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Mon, 6 May 2019 17:32:08 -0400 Subject: [PATCH] [fenix] Update the deprecated BitmapDrawable constructor (https://github.com/mozilla-mobile/fenix/pull/2308) --- CHANGELOG.md | 1 + .../java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cada00e03..e2d471cc94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #975 - Added telemetry for preference switches - #1955 - Added a confirmation dialog for QR code and barcode searches - #1874 - Added a "Turn on Sync" fragment for Firefox Accounts login and sign up +- #2308 - Update the deprecated BitmapDrawable constructor ### Changed - #1429 - Updated site permissions ui for MVP diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt index 8efdf0c0e3..90c0bdbb45 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarUIView.kt @@ -153,7 +153,7 @@ class ToolbarUIView( with(view.context) { val defaultEngineIcon = components.search.searchEngineManager.defaultSearchEngine?.icon val searchIcon = newState.engine?.icon ?: defaultEngineIcon - val draw = BitmapDrawable(searchIcon) + val draw = BitmapDrawable(resources, searchIcon) val iconSize = containerView?.context!!.resources.getDimension(R.dimen.preference_icon_drawable_size).toInt() draw.setBounds(0, 0, iconSize, iconSize)