Loading src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle private String getSummary(long usedBytes, long totalBytes) { NumberFormat percentageFormat = NumberFormat.getPercentInstance(); final String[] freeSpace = Formatter.formatFileSize(mContext, totalBytes - usedBytes).split(" "); Formatter.formatFileSize(mContext, totalBytes - usedBytes).split("\\s"); return mContext.getString(R.string.storage_summary, totalBytes == 0L ? "0" : percentageFormat.format(((double) usedBytes) / totalBytes), freeSpace[0], freeSpace[1]); Loading src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class LowStorageSlice implements CustomSliceable { // Generate Low storage Slice. final String percentageString = NumberFormat.getPercentInstance().format(usedPercentage); final String[] freeSizeString = Formatter.formatFileSize(mContext, info.freeBytes).split(" "); Formatter.formatFileSize(mContext, info.freeBytes).split("\\s"); final ListBuilder listBuilder = new ListBuilder(mContext, CustomSliceRegistry.LOW_STORAGE_SLICE_URI, ListBuilder.INFINITY).setAccentColor( Loading tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class TopLevelStoragePreferenceControllerTest { when(mController.getStorageManagerVolumeProvider()) .thenReturn(mStorageManagerVolumeProvider); final String percentage = NumberFormat.getPercentInstance().format(1); final String[] freeSpace = Formatter.formatFileSize(mContext, 0).split(" "); final String[] freeSpace = Formatter.formatFileSize(mContext, 0).split("\\s"); final Preference preference = new Preference(mContext); // Wait for asynchronous thread to finish, otherwise test will flake. Loading Loading
src/com/android/settings/deviceinfo/TopLevelStoragePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle private String getSummary(long usedBytes, long totalBytes) { NumberFormat percentageFormat = NumberFormat.getPercentInstance(); final String[] freeSpace = Formatter.formatFileSize(mContext, totalBytes - usedBytes).split(" "); Formatter.formatFileSize(mContext, totalBytes - usedBytes).split("\\s"); return mContext.getString(R.string.storage_summary, totalBytes == 0L ? "0" : percentageFormat.format(((double) usedBytes) / totalBytes), freeSpace[0], freeSpace[1]); Loading
src/com/android/settings/homepage/contextualcards/slices/LowStorageSlice.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class LowStorageSlice implements CustomSliceable { // Generate Low storage Slice. final String percentageString = NumberFormat.getPercentInstance().format(usedPercentage); final String[] freeSizeString = Formatter.formatFileSize(mContext, info.freeBytes).split(" "); Formatter.formatFileSize(mContext, info.freeBytes).split("\\s"); final ListBuilder listBuilder = new ListBuilder(mContext, CustomSliceRegistry.LOW_STORAGE_SLICE_URI, ListBuilder.INFINITY).setAccentColor( Loading
tests/unit/src/com/android/settings/deviceinfo/TopLevelStoragePreferenceControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class TopLevelStoragePreferenceControllerTest { when(mController.getStorageManagerVolumeProvider()) .thenReturn(mStorageManagerVolumeProvider); final String percentage = NumberFormat.getPercentInstance().format(1); final String[] freeSpace = Formatter.formatFileSize(mContext, 0).split(" "); final String[] freeSpace = Formatter.formatFileSize(mContext, 0).split("\\s"); final Preference preference = new Preference(mContext); // Wait for asynchronous thread to finish, otherwise test will flake. Loading