Loading core/java/android/database/sqlite/SQLiteGlobal.java +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ public final class SQLiteGlobal { public static int getDefaultPageSize() { synchronized (sLock) { if (sDefaultPageSize == 0) { // If there is an issue accessing /data, something is so seriously // wrong that we just let the IllegalArgumentException propagate. sDefaultPageSize = new StatFs("/data").getBlockSize(); } return SystemProperties.getInt("debug.sqlite.pagesize", sDefaultPageSize); Loading core/java/android/os/StatFs.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,11 +34,16 @@ public class StatFs { * class. * * @param path path in the desired file system to stat. * * @throws IllegalArgumentException if the file system access fails */ public StatFs(String path) { mStat = doStat(path); } /** * @throws IllegalArgumentException if the file system access fails */ private static StructStatVfs doStat(String path) { try { return Os.statvfs(path); Loading @@ -51,6 +56,8 @@ public class StatFs { * Perform a restat of the file system referenced by this object. This is * the same as re-constructing the object with the same file system path, * and the new stat values are available upon return. * * @throws IllegalArgumentException if the file system access fails */ public void restat(String path) { mStat = doStat(path); Loading services/core/java/com/android/server/storage/DeviceStorageMonitorService.java +2 −1 Original line number Diff line number Diff line Loading @@ -378,7 +378,8 @@ public class DeviceStorageMonitorService extends SystemService { mLastReportedFreeMemTime = 0; mResolver = context.getContentResolver(); mIsBootImageOnDisk = isBootImageOnDisk(); //create StatFs object // If these constructors throw IllegalArgumentException, something // is so seriously wrong that we just let the Exception propagate. mDataFileStats = new StatFs(DATA_PATH.getAbsolutePath()); mSystemFileStats = new StatFs(SYSTEM_PATH.getAbsolutePath()); mCacheFileStats = new StatFs(CACHE_PATH.getAbsolutePath()); Loading Loading
core/java/android/database/sqlite/SQLiteGlobal.java +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ public final class SQLiteGlobal { public static int getDefaultPageSize() { synchronized (sLock) { if (sDefaultPageSize == 0) { // If there is an issue accessing /data, something is so seriously // wrong that we just let the IllegalArgumentException propagate. sDefaultPageSize = new StatFs("/data").getBlockSize(); } return SystemProperties.getInt("debug.sqlite.pagesize", sDefaultPageSize); Loading
core/java/android/os/StatFs.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,11 +34,16 @@ public class StatFs { * class. * * @param path path in the desired file system to stat. * * @throws IllegalArgumentException if the file system access fails */ public StatFs(String path) { mStat = doStat(path); } /** * @throws IllegalArgumentException if the file system access fails */ private static StructStatVfs doStat(String path) { try { return Os.statvfs(path); Loading @@ -51,6 +56,8 @@ public class StatFs { * Perform a restat of the file system referenced by this object. This is * the same as re-constructing the object with the same file system path, * and the new stat values are available upon return. * * @throws IllegalArgumentException if the file system access fails */ public void restat(String path) { mStat = doStat(path); Loading
services/core/java/com/android/server/storage/DeviceStorageMonitorService.java +2 −1 Original line number Diff line number Diff line Loading @@ -378,7 +378,8 @@ public class DeviceStorageMonitorService extends SystemService { mLastReportedFreeMemTime = 0; mResolver = context.getContentResolver(); mIsBootImageOnDisk = isBootImageOnDisk(); //create StatFs object // If these constructors throw IllegalArgumentException, something // is so seriously wrong that we just let the Exception propagate. mDataFileStats = new StatFs(DATA_PATH.getAbsolutePath()); mSystemFileStats = new StatFs(SYSTEM_PATH.getAbsolutePath()); mCacheFileStats = new StatFs(CACHE_PATH.getAbsolutePath()); Loading