ui: remove unused elvis operators

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-07-06 19:05:45 +02:00
parent e4a49a5356
commit adefd16f7e

View File

@ -88,13 +88,13 @@ class QuickTileService : TileService() {
val icon = SlashDrawable(resources.getDrawable(R.drawable.ic_tile, Application.get().theme)) val icon = SlashDrawable(resources.getDrawable(R.drawable.ic_tile, Application.get().theme))
icon.setAnimationEnabled(false) /* Unfortunately we can't have animations, since Icons are marshaled. */ icon.setAnimationEnabled(false) /* Unfortunately we can't have animations, since Icons are marshaled. */
icon.setSlashed(false) icon.setSlashed(false)
var b = Bitmap.createBitmap(icon.intrinsicWidth, icon.intrinsicHeight, Bitmap.Config.ARGB_8888) ?: return var b = Bitmap.createBitmap(icon.intrinsicWidth, icon.intrinsicHeight, Bitmap.Config.ARGB_8888)
var c = Canvas(b) var c = Canvas(b)
icon.setBounds(0, 0, c.width, c.height) icon.setBounds(0, 0, c.width, c.height)
icon.draw(c) icon.draw(c)
iconOn = Icon.createWithBitmap(b) iconOn = Icon.createWithBitmap(b)
icon.setSlashed(true) icon.setSlashed(true)
b = Bitmap.createBitmap(icon.intrinsicWidth, icon.intrinsicHeight, Bitmap.Config.ARGB_8888) ?: return b = Bitmap.createBitmap(icon.intrinsicWidth, icon.intrinsicHeight, Bitmap.Config.ARGB_8888)
c = Canvas(b) c = Canvas(b)
icon.setBounds(0, 0, c.width, c.height) icon.setBounds(0, 0, c.width, c.height)
icon.draw(c) icon.draw(c)