ui: squelch warnings

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-03-24 14:08:41 -06:00
parent 585257c995
commit f1b541a1eb
2 changed files with 4 additions and 2 deletions

View File

@ -129,7 +129,7 @@ class TunnelListFragment : BaseFragment() {
futureTunnels.add(
Application.getTunnelManager().create(
name,
Config.parse(contentResolver.openInputStream(uri))
Config.parse(contentResolver.openInputStream(uri)!!)
).toCompletableFuture()
)
}

View File

@ -59,7 +59,9 @@ class SlashDrawable(private val mDrawable: Drawable) : Drawable() {
mPath.addRoundRect(mSlashRect, 1f * width, 1f * height, Path.Direction.CW)
m.setRotate(mRotation + DEFAULT_ROTATION, width / 2f, height / 2f)
mPath.transform(m)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) canvas.clipPath(mPath, Region.Op.DIFFERENCE) else canvas.clipOutPath(mPath)
@Suppress("DEPRECATION")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
canvas.clipPath(mPath, Region.Op.DIFFERENCE) else canvas.clipOutPath(mPath)
mDrawable.draw(canvas)
canvas.restore()
}