mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
Issue #1391 - Remove the DOM battery API
This commit is contained in:
parent
d97bcfb97a
commit
b33e80b186
30 changed files with 0 additions and 1833 deletions
|
|
@ -432,30 +432,6 @@ QuotaManagerService::PerformIdleMaintenance()
|
|||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// If we're running on battery power then skip all idle maintenance since we
|
||||
// would otherwise be doing lots of disk I/O.
|
||||
BatteryInformation batteryInfo;
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// Android XPCShell doesn't load the AndroidBridge that is needed to make
|
||||
// GetCurrentBatteryInformation work...
|
||||
if (!QuotaManager::IsRunningXPCShellTests())
|
||||
#endif
|
||||
{
|
||||
GetCurrentBatteryInformation(&batteryInfo);
|
||||
}
|
||||
|
||||
// If we're running XPCShell because we always want to be able to test this
|
||||
// code so pretend that we're always charging.
|
||||
if (QuotaManager::IsRunningXPCShellTests()) {
|
||||
batteryInfo.level() = 100;
|
||||
batteryInfo.charging() = true;
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(!batteryInfo.charging())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (QuotaManager::IsRunningXPCShellTests()) {
|
||||
// We don't want user activity to impact this code if we're running tests.
|
||||
Unused << Observe(nullptr, OBSERVER_TOPIC_IDLE, nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue