提交 a50baea3 编写于 作者: K kevinkong

Fixed: #21 #10

上级 244509aa
......@@ -155,7 +155,7 @@ public class EmmageeService extends Service {
int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
int scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
totalBatt = String.valueOf(level * 100 / scale) + "%";
totalBatt = String.valueOf(level * 100 / scale);
voltage = String.valueOf(intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1) * 1.0 / 1000);
......@@ -438,8 +438,6 @@ public class EmmageeService extends Service {
try {
if (Math.abs(Double.parseDouble(currentBatt)) >= 500) {
currentBatt = "N/A";
} else {
currentBatt = currentBatt + "mA";
}
} catch (Exception e) {
currentBatt = "N/A";
......
......@@ -138,7 +138,7 @@ public class CpuInfo {
public ArrayList<String> getCpuRatioInfo(String totalBatt, String currentBatt, String temperature, String voltage) {
DecimalFormat fomart = new DecimalFormat();
// fomart.setGroupingUsed(false);
fomart.setGroupingUsed(false);
fomart.setMaximumFractionDigits(2);
fomart.setMinimumFractionDigits(2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册