Xiaomi’s smart charging algorithm