mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Backed out changeset 7bb636bd183b (bug 1250106) for test_deprecated_battery_basics.html failures CLOSED TREE
MozReview-Commit-ID: GuZQHh8G8YC
This commit is contained in:
parent
e0c1c1fcad
commit
42a4a32f0c
@ -140,19 +140,15 @@ BatteryManager::UpdateFromBatteryInfo(const hal::BatteryInformation& aBatteryInf
|
||||
doc->NodePrincipal()->GetAppStatus(&status);
|
||||
}
|
||||
|
||||
mCharging = aBatteryInfo.charging();
|
||||
mRemainingTime = aBatteryInfo.remainingTime();
|
||||
|
||||
if (!nsContentUtils::IsChromeDoc(doc) &&
|
||||
status != nsIPrincipal::APP_STATUS_CERTIFIED)
|
||||
{
|
||||
mLevel = lround(mLevel * 10.0) / 10.0;
|
||||
if (mLevel == 1.0) {
|
||||
mCharging = false;
|
||||
mRemainingTime = kDefaultRemainingTime;
|
||||
}
|
||||
}
|
||||
|
||||
mCharging = aBatteryInfo.charging();
|
||||
mRemainingTime = aBatteryInfo.remainingTime();
|
||||
|
||||
// Add some guards to make sure the values are coherent.
|
||||
if (mLevel == 1.0 && mCharging == true &&
|
||||
mRemainingTime != kDefaultRemainingTime) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user