Use IEC units in app info data usage.
Settings > Apps & notifications > select some app that has done some internet traffic. Observe "Mobile data & Wi-Fi" summary data and take note of the numbers. Then tap on it and observe that the numbers on the details page don't match the one in the summary. This is because the details use IEC units while the summary uses SI units. This fix changes the summary to use IEC units too, removing the discrepancy. Bug: 137917003 Test: manually cause some traffic, see that the numbers are now consistent between the app info and usage details page Change-Id: I4be5830d4e98a1c4739001c812e59d82415bf24a
This commit is contained in:
@@ -127,7 +127,7 @@ public class AppDataUsagePreferenceController extends AppInfoPreferenceControlle
|
||||
return mContext.getString(R.string.no_data_usage);
|
||||
}
|
||||
return mContext.getString(R.string.data_summary_format,
|
||||
Formatter.formatFileSize(mContext, totalBytes),
|
||||
Formatter.formatFileSize(mContext, totalBytes, Formatter.FLAG_IEC_UNITS),
|
||||
DateUtils.formatDateTime(mContext, startTime,
|
||||
DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH));
|
||||
}
|
||||
|
Reference in New Issue
Block a user