• Kyle Horimoto's avatar
    [CrOS Tether] Show the "Enable Bluetooth" notification when appropriate. · 1a84bb65
    Kyle Horimoto authored
    The notification can be shown during two point in time: when the user logs in,
    and when the user disconnects from the Internet. In order for the notification
    to be shown, Bluetooth must be disabled, the device must be disconnected from
    the Internet, and there must be nothing besides Bluetooth preventing a Tether
    scan from beginning.
    
    This CL also changes the ownership of TetherNotificationPresenter. Now, one
    instance is created and owned by TetherService and is passed through to the
    Tether component when needed. Previously, the instance was owned by the Tether
    component, but this no longer worked due to the fact that TetherService needed
    to be able to display the "enable Bluetooth" notification when Tether was left
    uninitialized (due to Bluetooth being disabled).
    
    Lastly, now TetherService only sets Tether's TechnologyState to
    UNINITIALIZED when Bluetooth is disabled, which fixes an issue in which
    an "enable Bluetooth" message is shown in Quick Settings when Bluetooth
    is on but Cellular is disabled.
    
    Bug: 672263, 740635
    Change-Id: Id19a847a9efb7a31d23d2ffb6308fad7d46ca948
    Reviewed-on: https://chromium-review.googlesource.com/580349
    Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
    Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#488488}
    1a84bb65
initializer.h 5.93 KB