Update the deprecated BitmapDrawable constructor (#2308)

This commit is contained in:
Vlad Filippov 2019-05-06 17:32:08 -04:00 committed by Jeff Boek
parent 7d577e5953
commit 62ae2bca11
2 changed files with 2 additions and 1 deletions

View File

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

View File

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