summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-18 11:32:27 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-18 13:06:54 +0200
commitc0bab02592b4799f35cb9b1c3f9c571b4fdb9899 (patch)
treea374ba1d83775b96056967cae0f19314443aa3b3 /app/src/main/java/com/wireguard
parent9f74ed2e6ed6471ba2beb95d3126a01ee476a819 (diff)
Suppress depreciation warnings
We know what we're doing here, and it's not nice.
Diffstat (limited to 'app/src/main/java/com/wireguard')
-rw-r--r--app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java2
-rw-r--r--app/src/main/java/com/wireguard/android/widget/SlashDrawable.java1
2 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java b/app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java
index efe09f3f..7db46fa9 100644
--- a/app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java
+++ b/app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java
@@ -62,6 +62,7 @@ public class DownloadsFileSaver {
final OutputStream contentStream = contentResolver.openOutputStream(contentUri);
if (contentStream == null)
throw new IOException(context.getString(R.string.create_downloads_file_error));
+ @SuppressWarnings("deprecation")
Cursor cursor = contentResolver.query(contentUri, new String[]{MediaColumns.DATA}, null, null, null);
String path = null;
if (cursor != null) {
@@ -86,6 +87,7 @@ public class DownloadsFileSaver {
}
return new DownloadsFile(context, contentStream, path, contentUri);
} else {
+ @SuppressWarnings("deprecation")
final File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
final File file = new File(path, name);
if (!path.isDirectory() && !path.mkdirs())
diff --git a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
index 61ce1362..9fddbe6f 100644
--- a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
+++ b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
@@ -124,6 +124,7 @@ public class SlashDrawable extends Drawable {
return mDrawable.getIntrinsicWidth();
}
+ @SuppressWarnings("deprecation")
@Override
public int getOpacity() {
return PixelFormat.OPAQUE;