am 51334310
: Add no data usage string
* commit '51334310a26a29d3ac3ad4e7299110b6de0ae75c': Add no data usage string
This commit is contained in:
@@ -6696,4 +6696,7 @@
|
|||||||
|
|
||||||
<!-- Label for maximum amount of memory app has used [CHAR LIMIT=25] -->
|
<!-- Label for maximum amount of memory app has used [CHAR LIMIT=25] -->
|
||||||
<string name="memory_maximum_usage">Maximum usage</string>
|
<string name="memory_maximum_usage">Maximum usage</string>
|
||||||
|
|
||||||
|
<!-- Summary of data item when no data usage [CHAR LIMIT=40] -->
|
||||||
|
<string name="no_data_usage">No data used</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -516,6 +516,9 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
private CharSequence getDataSummary() {
|
private CharSequence getDataSummary() {
|
||||||
if (mChartData != null) {
|
if (mChartData != null) {
|
||||||
long totalBytes = mChartData.detail.getTotalBytes();
|
long totalBytes = mChartData.detail.getTotalBytes();
|
||||||
|
if (totalBytes == 0) {
|
||||||
|
return getString(R.string.no_data_usage);
|
||||||
|
}
|
||||||
Context context = getActivity();
|
Context context = getActivity();
|
||||||
return getString(R.string.data_summary_format,
|
return getString(R.string.data_summary_format,
|
||||||
Formatter.formatFileSize(context, totalBytes),
|
Formatter.formatFileSize(context, totalBytes),
|
||||||
|
Reference in New Issue
Block a user