summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-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;