summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-07-09 15:28:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-07-09 15:28:51 -0700
commitdff4ec87e7b942b7b4410f639fc74c2cffb386d6 (patch)
tree0170831ebee5c0b5fba1f6ddfce0d0cd8f1d5a13
parent4d380d71e06781314b052ea71ef20ed6511e560f (diff)
parente16a21c6b4f108813e5f5e00f30e0ff075de504c (diff)
downloadframeworks_base-dff4ec87e7b942b7b4410f639fc74c2cffb386d6.zip
frameworks_base-dff4ec87e7b942b7b4410f639fc74c2cffb386d6.tar.gz
frameworks_base-dff4ec87e7b942b7b4410f639fc74c2cffb386d6.tar.bz2
am e16a21c6: resolved conflicts for merge of 4a59376d to stage-aosp-master
* commit 'e16a21c6b4f108813e5f5e00f30e0ff075de504c': Track libcore API change.
-rw-r--r--core/java/android/os/StatFs.java18
-rw-r--r--packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java4
2 files changed, 11 insertions, 11 deletions
diff --git a/core/java/android/os/StatFs.java b/core/java/android/os/StatFs.java
index 2314057..9e9521a 100644
--- a/core/java/android/os/StatFs.java
+++ b/core/java/android/os/StatFs.java
@@ -18,14 +18,14 @@ package android.os;
import libcore.io.ErrnoException;
import libcore.io.Libcore;
-import libcore.io.StructStatFs;
+import libcore.io.StructStatVfs;
/**
* Retrieve overall information about the space on a filesystem. This is a
- * wrapper for Unix statfs().
+ * wrapper for Unix statvfs().
*/
public class StatFs {
- private StructStatFs mStat;
+ private StructStatVfs mStat;
/**
* Construct a new StatFs for looking at the stats of the filesystem at
@@ -39,9 +39,9 @@ public class StatFs {
mStat = doStat(path);
}
- private static StructStatFs doStat(String path) {
+ private static StructStatVfs doStat(String path) {
try {
- return Libcore.os.statfs(path);
+ return Libcore.os.statvfs(path);
} catch (ErrnoException e) {
throw new IllegalArgumentException("Invalid path: " + path, e);
}
@@ -66,7 +66,7 @@ public class StatFs {
/**
* The size, in bytes, of a block on the file system. This corresponds to
- * the Unix {@code statfs.f_bsize} field.
+ * the Unix {@code statvfs.f_bsize} field.
*/
public long getBlockSizeLong() {
return mStat.f_bsize;
@@ -82,7 +82,7 @@ public class StatFs {
/**
* The total number of blocks on the file system. This corresponds to the
- * Unix {@code statfs.f_blocks} field.
+ * Unix {@code statvfs.f_blocks} field.
*/
public long getBlockCountLong() {
return mStat.f_blocks;
@@ -99,7 +99,7 @@ public class StatFs {
/**
* The total number of blocks that are free on the file system, including
* reserved blocks (that are not available to normal applications). This
- * corresponds to the Unix {@code statfs.f_bfree} field. Most applications
+ * corresponds to the Unix {@code statvfs.f_bfree} field. Most applications
* will want to use {@link #getAvailableBlocks()} instead.
*/
public long getFreeBlocksLong() {
@@ -125,7 +125,7 @@ public class StatFs {
/**
* The number of blocks that are free on the file system and available to
- * applications. This corresponds to the Unix {@code statfs.f_bavail} field.
+ * applications. This corresponds to the Unix {@code statvfs.f_bavail} field.
*/
public long getAvailableBlocksLong() {
return mStat.f_bavail;
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index de77cac..d3bd197 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -71,7 +71,7 @@ import libcore.io.ErrnoException;
import libcore.io.IoUtils;
import libcore.io.Libcore;
import libcore.io.Streams;
-import libcore.io.StructStatFs;
+import libcore.io.StructStatVfs;
/*
* This service copies a downloaded apk to a file passed in as
@@ -244,7 +244,7 @@ public class DefaultContainerService extends IntentService {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
try {
- final StructStatFs stat = Libcore.os.statfs(path);
+ final StructStatVfs stat = Libcore.os.statvfs(path);
final long totalSize = stat.f_blocks * stat.f_bsize;
final long availSize = stat.f_bavail * stat.f_bsize;
return new long[] { totalSize, availSize };