Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 2464473002: [Download Home] Make the space display usable (Closed)
Patch Set: Added javadoc Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/res/drawable/material_progressbar.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index 9680600d30206625b3593563109f5ade54a3c0f4..5286a075818f5de107797f55db95e5743c2ad0f7 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -526,7 +526,19 @@ public class ApiCompatibilityUtils {
}
/**
- * See {@link android.os.StatFs#getBlockCount()}.
+ * See {@link android.os.StatFs#getAvailableBlocksLong}.
+ */
+ @SuppressWarnings("deprecation")
+ public static long getAvailableBlocks(StatFs statFs) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ return statFs.getAvailableBlocksLong();
+ } else {
+ return statFs.getAvailableBlocks();
+ }
+ }
+
+ /**
+ * See {@link android.os.StatFs#getBlockCount}.
*/
@SuppressWarnings("deprecation")
public static long getBlockCount(StatFs statFs) {
@@ -538,7 +550,7 @@ public class ApiCompatibilityUtils {
}
/**
- * See {@link android.os.StatFs#getBlockSize()}.
+ * See {@link android.os.StatFs#getBlockSize}.
*/
@SuppressWarnings("deprecation")
public static long getBlockSize(StatFs statFs) {
« no previous file with comments | « no previous file | chrome/android/java/res/drawable/material_progressbar.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698