Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkong committed Apr 10, 2014
1 parent 244509a commit a50baea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/com/netease/qa/emmagee/service/EmmageeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void onReceive(Context context, Intent intent) {
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);

Expand Down Expand Up @@ -438,8 +438,6 @@ private void dataRefresh() {
try {
if (Math.abs(Double.parseDouble(currentBatt)) >= 500) {
currentBatt = "N/A";
} else {
currentBatt = currentBatt + "mA";
}
} catch (Exception e) {
currentBatt = "N/A";
Expand Down
2 changes: 1 addition & 1 deletion src/com/netease/qa/emmagee/utils/CpuInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public String getCpuName() {
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);

Expand Down

0 comments on commit a50baea

Please sign in to comment.