[fenix] Update the deprecated BitmapDrawable constructor (https://github.com/mozilla-mobile/fenix/pull/2308)

pull/600/head
Vlad Filippov 5 years ago committed by Jeff Boek
parent b52e4616e0
commit 795b7c3cf0

@ -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

@ -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)

Loading…
Cancel
Save