• Regan Hsu's avatar
    [CrOS PhoneHub] Properly update tether status in Disconnect() case. · 6b822133
    Regan Hsu authored
    When OnActiveNetworksChanged() is called shortly after starting a
    disconnect to a ConnectionStateType::kConnecting |tether_network_|, the
    |tether_network_|'s ConnectionStateType may still remain in the
    ConnectionStateType::kConnecting state. This may happen if on the phone,
    hotspot is off but bluetooth tethering is on, and a connection attempt
    is made, but the user does not acknowledge the notification to connect
    on their phone, and subsequently decides to disconnect while
    |tether_network_|'s ConnectionStateType is still
    ConnectionStateType::kConnecting.
    
    By the time OnDisconnectCompleted() is called, the connection state is
    properly updated to ConnectionStateType::kDisconnected, so a fetch may
    be necessary to promptly update |tether_network_|, as neither
    OnActiveNetworksChanged() nor OnNetworkStateListChanged() may be
    called shortly afterwards with the latest network information.
    
    Fixed: 1143041
    Bug: 1106937
    Change-Id: Ieb5c6071cc661fed1a3310a24c57b1927348f9d8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510876
    Commit-Queue: Regan Hsu <hsuregan@chromium.org>
    Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#823953}
    6b822133
BUILD.gn 6.26 KB