Merge "Add preferences in new connected device page"
This commit is contained in:
committed by
Android (Google) Code Review
commit
b5931a6624
@@ -73,10 +73,20 @@ public class BluetoothPairingDetail extends DeviceListPreferenceFragment impleme
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
updateContent(mLocalAdapter.getBluetoothState());
|
||||
updateBluetooth();
|
||||
mAvailableDevicesCategory.setProgress(mLocalAdapter.isDiscovering());
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void updateBluetooth() {
|
||||
if (mLocalAdapter.isEnabled()) {
|
||||
updateContent(mLocalAdapter.getBluetoothState());
|
||||
} else {
|
||||
// Turn on bluetooth if it is disabled
|
||||
mLocalAdapter.enable();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
|
Reference in New Issue
Block a user