Commit 7f8c7505 authored by Lukáš Tinkl's avatar Lukáš Tinkl
Browse files

Revert "don't consider external batteries (mice, keyboard, BT) as primary"

This reverts commit d1661d16.

This causes more trouble than expected, newer kernels/upower contain a bug that (in my case
and many others) marks ALL batteries as non-powersupply.

BUG:301033
CCBUG:300787
parent 19213a6c
......@@ -44,18 +44,15 @@ Solid::Battery::BatteryType Battery::type() const
{
Solid::Battery::BatteryType result = Solid::Battery::UnknownBattery;
const uint t = m_device->prop("Type").toUInt();
bool powerSupply = m_device->prop("PowerSupply").toBool();
switch (t)
{
case 1: // TODO "Line Power"
break;
case 2:
if (powerSupply)
result = Solid::Battery::PrimaryBattery;
result = Solid::Battery::PrimaryBattery;
break;
case 3:
if (powerSupply)
result = Solid::Battery::UpsBattery;
result = Solid::Battery::UpsBattery;
break;
case 4:
result = Solid::Battery::MonitorBattery;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment