Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 7905881a authored by Adithya R's avatar Adithya R Committed by Michael Bestas
Browse files

usb: Show charging notification only if power brick is disconnected

On USB HIDL devices (qcom) and barely-implemented AIDL (older Pixels)
the power brick connection status is always POWER_BRICK_STATUS_UNKNOWN,
leading to charging notification showing up even while charging with a
wall charger.

Properly implemented USB AIDL [1] should report
POWER_BRICK_STATUS_DISCONNECTED when charging with anything other than
a wall charger (i.e SDP/PD), hence use this as the check instead.

[1]: https://android.googlesource.com/device/google/gs101/+/94bc87a6f21a027fc8c30ba3fbf1328b0adc5959/usb/usb/Usb.cpp#785

Fixes a13e3779.

Change-Id: I9e251211e5801b2c1766a12bab7d4787c445dc14
parent 717a8db8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment