Modify getting of primary storage size
Settings application shows internal storage size using API getTotalBytes in StorageStatsManager. This API calls getPrimaryStorageSize() in StorageManager. getPrimaryStorageSize() returns /data parition size calculated API roundStorageSize() in FileUtils. Using this API, total primary storage size returns 8GB if 16GB emmc size device has /data partition size below 8GB. So we should modify getting of primary storage size close to real emmc size. getPrimaryStorageSize() will be calculated sum of /data and /system partition size. Test: Check primary storage size in Settings application Change-Id: I3ad33534b1c55d09afbb0e9be1c408c02c442842 Signed-off-by: hj.seo <hj.seo@lge.com>
This commit is contained in:
@@ -1083,12 +1083,14 @@ public class StorageManager {
|
||||
/** {@hide} */
|
||||
public static Pair<String, Long> getPrimaryStoragePathAndSize() {
|
||||
return Pair.create(null,
|
||||
FileUtils.roundStorageSize(Environment.getDataDirectory().getTotalSpace()));
|
||||
FileUtils.roundStorageSize(Environment.getDataDirectory().getTotalSpace()
|
||||
+ Environment.getRootDirectory().getTotalSpace()));
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
public long getPrimaryStorageSize() {
|
||||
return FileUtils.roundStorageSize(Environment.getDataDirectory().getTotalSpace());
|
||||
return FileUtils.roundStorageSize(Environment.getDataDirectory().getTotalSpace()
|
||||
+ Environment.getRootDirectory().getTotalSpace());
|
||||
}
|
||||
|
||||
/** @removed */
|
||||
|
||||
Reference in New Issue
Block a user