Merge "Add Rename device on Bluetooth screen" into pi-dev am: 667cbc5846
am: 5783578aad
Change-Id: Ibc9a0adc76de9c411391d612238fa39d42d1ddc3
This commit is contained in:
@@ -30,12 +30,8 @@ import com.android.settings.R;
|
||||
import com.android.settings.search.Indexable;
|
||||
import com.android.settingslib.bluetooth.BluetoothDeviceFilter;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* BluetoothPairingDetail is a page to scan bluetooth devices and pair them.
|
||||
*/
|
||||
@@ -47,7 +43,6 @@ public class BluetoothPairingDetail extends DeviceListPreferenceFragment impleme
|
||||
static final String KEY_AVAIL_DEVICES = "available_devices";
|
||||
@VisibleForTesting
|
||||
static final String KEY_FOOTER_PREF = "footer_preference";
|
||||
private static final String KEY_RENAME_DEVICES = "bt_pair_rename_devices";
|
||||
|
||||
@VisibleForTesting
|
||||
BluetoothProgressCategory mAvailableDevicesCategory;
|
||||
@@ -80,6 +75,12 @@ public class BluetoothPairingDetail extends DeviceListPreferenceFragment impleme
|
||||
mAvailableDevicesCategory.setProgress(mLocalAdapter.isDiscovering());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
use(BluetoothDeviceRenamePreferenceController.class).setFragment(this);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void updateBluetooth() {
|
||||
if (mLocalAdapter.isEnabled()) {
|
||||
@@ -199,16 +200,6 @@ public class BluetoothPairingDetail extends DeviceListPreferenceFragment impleme
|
||||
return R.xml.bluetooth_pairing_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
controllers.add(
|
||||
new BluetoothDeviceRenamePreferenceController(context, KEY_RENAME_DEVICES, this,
|
||||
getLifecycle()));
|
||||
|
||||
return controllers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDeviceListKey() {
|
||||
return KEY_AVAIL_DEVICES;
|
||||
|
Reference in New Issue
Block a user