mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 23:59:54 +01:00
Suppress lint warning: NewApi.
This commit is contained in:
@@ -2,14 +2,14 @@ package org.briarproject.system;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.briarproject.api.system.FileUtils;
|
import org.briarproject.api.system.FileUtils;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.StatFs;
|
import android.os.StatFs;
|
||||||
|
|
||||||
class AndroidFileUtils implements FileUtils {
|
class AndroidFileUtils implements FileUtils {
|
||||||
|
|
||||||
|
@SuppressLint("NewApi")
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public long getTotalSpace(File f) throws IOException {
|
public long getTotalSpace(File f) throws IOException {
|
||||||
if(Build.VERSION.SDK_INT >= 9) return f.getTotalSpace();
|
if(Build.VERSION.SDK_INT >= 9) return f.getTotalSpace();
|
||||||
@@ -18,6 +18,7 @@ class AndroidFileUtils implements FileUtils {
|
|||||||
return (long) s.getBlockCount() * s.getBlockSize();
|
return (long) s.getBlockCount() * s.getBlockSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NewApi")
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public long getFreeSpace(File f) throws IOException {
|
public long getFreeSpace(File f) throws IOException {
|
||||||
if(Build.VERSION.SDK_INT >= 9) return f.getUsableSpace();
|
if(Build.VERSION.SDK_INT >= 9) return f.getUsableSpace();
|
||||||
|
|||||||
Reference in New Issue
Block a user