File tree Expand file tree Collapse file tree
src/com/android/systemui/statusbar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 221221 <!-- Data usage info -->
222222 <string name =" usage_data" >used</string >
223223 <string name =" usage_wifi_prefix" >Wi-Fi</string >
224+ <string name =" usage_data_today" >used today</string >
224225</resources >
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ private void updateUsageData() {
6565 DataUsageController dataController = new DataUsageController (mContext );
6666 DataUsageController .DataUsageInfo info ;
6767 String prefix ;
68+ String suffix ;
6869 if (isWifiConnected ()) {
6970 final NetworkTemplate template ;
7071 final WifiInfo wifiInfo = mWifiManager .getConnectionInfo ();
@@ -75,14 +76,16 @@ private void updateUsageData() {
7576 }
7677 info = dataController .getDataUsageInfo (template );
7778 prefix = mContext .getResources ().getString (R .string .usage_wifi_prefix );
79+ suffix = mContext .getResources ().getString (R .string .usage_data );
7880 } else {
7981 dataController .setSubscriptionId (SubscriptionManager .getDefaultDataSubscriptionId ());
8082 info = showDailyDataUsage ? dataController .getDailyDataUsageInfo ()
8183 : dataController .getDataUsageInfo ();
8284 prefix = getSlotCarrierName ();
8385 }
84- formattedInfo = prefix + ": " + formatDataUsage (info .usageLevel ) + " "
85- + mContext .getResources ().getString (R .string .usage_data );
86+ suffix = showDailyDataUsage ? mContext .getResources ().getString (R .string .usage_data_today )
87+ : mContext .getResources ().getString (R .string .usage_data );
88+ formattedInfo = prefix + ": " + formatDataUsage (info .usageLevel ) + " " + suffix ;
8689 shouldUpdateDataTextView = true ;
8790 }
8891
You can’t perform that action at this time.
0 commit comments