Commit 8714bf4d authored by spiiroin's avatar spiiroin

Merge branch 'mer1677_cable_to_charger' into 'master'

Cancel mode selection when charger is detected

See merge request !15
parents b70f679e b1d7a18f
......@@ -311,6 +311,20 @@ static void setup_charger_connection(void)
log_debug("UDEV:USB dedicated charger connected\n");
if (cable) {
/* The connection was initially reported incorrectly
* as pc cable, then later on declared as charger.
* Clear "connected" boolean flag so that the
* set_charger_connected() call below acts as if charger
* were detected already on connect: mode gets declared
* as dedicated charger (and the mode selection dialog
* shown by ui gets closed).
charger = 1;
cable = 0;
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