diff options
author | Alfred Neumayer <dev.beidl@gmail.com> | 2022-11-12 02:42:47 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-11-12 21:59:10 +0100 |
commit | cdf24598041c6cb13bac696c42bbb66ec869b216 (patch) | |
tree | 8d5ff0dc4212961894f1b66c240b71f8a95a82e2 | |
parent | ce3cef135571b17b901b08d6e3bc4052de966c26 (diff) | |
download | ayatana-indicator-power-cdf24598041c6cb13bac696c42bbb66ec869b216.tar.gz ayatana-indicator-power-cdf24598041c6cb13bac696c42bbb66ec869b216.tar.bz2 ayatana-indicator-power-cdf24598041c6cb13bac696c42bbb66ec869b216.zip |
Revert "Don't prioritize discharging items with no time estimate that have more than 10% power remaining."
As the battery in the Pixel 3a running 20.04 exposes itself without any
time estimates, it gets hidden by the indicator unless below 10% of charge.
The original commit message mentions low-power devices having no time
estimates most probably due to lasting long, but (without an honest checkup
of the upstream kernel sources) I doubt the kernel driver to distinguish
between those capabilities in the power_supply properties, hence remove
this artificial limit again.
This reverts commit 522fdc6abbfee52dec5c6b0194cf87ffcc0f3dcd.
-rw-r--r-- | src/service.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/service.c b/src/service.c index 9f18825..61a945c 100644 --- a/src/service.c +++ b/src/service.c @@ -200,14 +200,6 @@ device_compare_func (gconstpointer ga, gconstpointer gb) } state = UP_DEVICE_STATE_DISCHARGING; - - /* discharging items with more than 10% remaining always lose */ - if (!ret && (((a_state == state) && !a_time && (a_percentage > 10)))) - ret = 1; - - if (!ret && (((b_state == state) && !b_time && (b_percentage > 10)))) - ret = -1; - if (!ret && (((a_state == state) && a_time) || ((b_state == state) && b_time))) { |