diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-24 14:08:41 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-24 14:17:18 -0600 |
commit | f1b541a1ebb2b931aff2ff0c211f86f84ae80538 (patch) | |
tree | 384174af96650fb7024bd44f0c981a68353147de /ui/src/main/java | |
parent | 585257c995e2a76d693903edc30d65f9e5d48a98 (diff) |
ui: squelch warnings
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt | 2 | ||||
-rw-r--r-- | ui/src/main/java/com/wireguard/android/widget/SlashDrawable.kt | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt index 32bd34f6..4355d495 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt @@ -129,7 +129,7 @@ class TunnelListFragment : BaseFragment() { futureTunnels.add( Application.getTunnelManager().create( name, - Config.parse(contentResolver.openInputStream(uri)) + Config.parse(contentResolver.openInputStream(uri)!!) ).toCompletableFuture() ) } diff --git a/ui/src/main/java/com/wireguard/android/widget/SlashDrawable.kt b/ui/src/main/java/com/wireguard/android/widget/SlashDrawable.kt index a93e35f5..50741264 100644 --- a/ui/src/main/java/com/wireguard/android/widget/SlashDrawable.kt +++ b/ui/src/main/java/com/wireguard/android/widget/SlashDrawable.kt @@ -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() } |