Suppress depreciation warnings
We know what we're doing here, and it's not nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
a532a88585
commit
20717ff128
@ -62,6 +62,7 @@ public class DownloadsFileSaver {
|
|||||||
final OutputStream contentStream = contentResolver.openOutputStream(contentUri);
|
final OutputStream contentStream = contentResolver.openOutputStream(contentUri);
|
||||||
if (contentStream == null)
|
if (contentStream == null)
|
||||||
throw new IOException(context.getString(R.string.create_downloads_file_error));
|
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);
|
Cursor cursor = contentResolver.query(contentUri, new String[]{MediaColumns.DATA}, null, null, null);
|
||||||
String path = null;
|
String path = null;
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
@ -86,6 +87,7 @@ public class DownloadsFileSaver {
|
|||||||
}
|
}
|
||||||
return new DownloadsFile(context, contentStream, path, contentUri);
|
return new DownloadsFile(context, contentStream, path, contentUri);
|
||||||
} else {
|
} else {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
final File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
final File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||||
final File file = new File(path, name);
|
final File file = new File(path, name);
|
||||||
if (!path.isDirectory() && !path.mkdirs())
|
if (!path.isDirectory() && !path.mkdirs())
|
||||||
|
@ -124,6 +124,7 @@ public class SlashDrawable extends Drawable {
|
|||||||
return mDrawable.getIntrinsicWidth();
|
return mDrawable.getIntrinsicWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public int getOpacity() {
|
public int getOpacity() {
|
||||||
return PixelFormat.OPAQUE;
|
return PixelFormat.OPAQUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user