Allow disconnected BT profiles to be unchecked in Settings.
In the Bluetooth profile list, the checkbox indicates whether the profile is preferred (we should auto connect). If the profile is not connected, selecting it will try to connect the profile and set it to preferred. If the profile can't be connected, then the user could not turn off the preferred setting for the profile. Change the behavior so that when a profile is not connected, but is marked as preferred, selecting the profile will turn off the preferred setting (no auto connect) instead of trying to connect. This enables the user to turn off auto connect for a profile when it can't be connected. Tapping a second time will try to connect the profile and set it as preferred, as usual. Also change PanProfile to return the current connection status for isPreferred() instead of always returning true. Currently, the PAN profile is always checked, which is confusing because it looks like PAN is always connected. Also, because of the new behavior when a profile is selected, it's now necessary to return false for isPreferred() when PAN isn't connected, so that we will try to connect when the user selects it, instead of trying to turn off the preferred setting, which isn't supported for PAN. Bug: 7007641 Change-Id: Ifb0f51a15379bc254933168c43bdfc8b22f26051
Loading
Please register or sign in to comment