• spiiroin's avatar
    [usb-moded] Use single function to exit charging fallback. Fixes JB#37759 · 8286dbf8
    spiiroin authored
    Whether and when we can switch for example from charging fallback to
    developer mode depends on multiple triggers - the order of which might vary
    from one device/bootup to another. Using custom state evaluation code at
    each possible trigger location easily causes unexpected results like device
    staying in fallback charging mode until the cable is re-attached.
    Add a state evaluation function and call it from those triggers that
    potentially allow exit from the charging fallback mode.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
usb_moded-devicelock.c 11.8 KB