diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-18 11:32:27 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-18 13:06:54 +0200 |
commit | 20717ff1286e1937eda7d92308fb5671ec70083f (patch) | |
tree | a374ba1d83775b96056967cae0f19314443aa3b3 | |
parent | a532a885851d4d13fcc0755ee61489199074b0ad (diff) |
Suppress depreciation warnings
We know what we're doing here, and it's not nice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | app/src/main/java/com/wireguard/android/util/DownloadsFileSaver.java | 2 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/android/widget/SlashDrawable.java | 1 |
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; |