diff options
-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() } |