Improve Bluetooth tethering UI usability.
- Updated hint text for BT tethering checkbox to "[Sharing|not sharing] this [tablet|phone]'s mobile data connection". - Show correct hint text when user enters tethering screen. - Show correct status after user enables tethering when Bluetooth is off. When BluetoothPan.setBluetoothTethering(true) is called with BT off, BluetoothPanProfileHandler will add a broadcast receiver to enable tethering after BT turns on. This happens too late to show the correct status when TetherSettings gets the adapter state changed event, so set a flag (mBluetoothEnableForTether) instead, and call setBluetoothTethering ourselves after the state changes to ON. Also, clear the flag if the adapter state changes to OFF or ERROR. - Show correct status when user enables tethering, then disables Bluetooth, then returns to the tethering screen. Previously it would show Bluetooth tethering enabled, even though adapter state was OFF. - Show the number of connected devices in tethering preference screen. - Distinguish between PANU and NAP in device profiles screen, and show appropriate text to clarify the direction of tethering. - Remove profiles from device profiles list when the device removes the UUID (e.g. Mac OS X turning NAP on/off) and after a NAP disconnection when the remote device only supports PANU. Bug: 3414575 Change-Id: I2c0830876d5b9bddb293e57c4d3ca74f105911b8
This commit is contained in:
@@ -22,13 +22,11 @@ import android.bluetooth.BluetoothHeadset;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.BluetoothUuid;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.ParcelUuid;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -176,7 +174,7 @@ final class HeadsetProfile implements LocalBluetoothProfile {
|
||||
return R.string.bluetooth_profile_headset;
|
||||
}
|
||||
|
||||
public int getDisconnectResource() {
|
||||
public int getDisconnectResource(BluetoothDevice device) {
|
||||
return R.string.bluetooth_disconnect_headset_profile;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user