Start cleaning up percentage formatting in Settings.
This fixes some of the percentage formatting issues, but there are still about ten strings with hard-coded %%s in them. Bug: 15476051 Change-Id: I668b6b16e598425f6006f6de0005c980f613f5b2
This commit is contained in:
@@ -26,6 +26,7 @@ import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
|
||||
public class ProcessStatsPreference extends Preference {
|
||||
private ProcStatsEntry mEntry;
|
||||
@@ -61,8 +62,7 @@ public class ProcessStatsPreference extends Preference {
|
||||
|
||||
public void setPercent(double percentOfWeight, double percentOfTime) {
|
||||
mProgress = (int) Math.ceil(percentOfWeight);
|
||||
mProgressText = getContext().getResources().getString(
|
||||
R.string.percentage, (int) Math.round(percentOfTime));
|
||||
mProgressText = Utils.formatPercentage((int) percentOfTime);
|
||||
notifyChanged();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user