Add device name preference in pairing page
Also refactor the preference controller 1. Extend from BasePreferenceController. 2. pass in the preference key. Then it could be reused in different places with different key. Bug: 69333961 Test: Screenshot | RunSettingsRoboTests Change-Id: I773ca022baa326481045c1659565c9a21111200a
This commit is contained in:
@@ -47,6 +47,7 @@ import org.robolectric.annotation.Config;
|
||||
public class BluetoothDeviceRenamePreferenceControllerTest {
|
||||
|
||||
private static final String DEVICE_NAME = "Nightshade";
|
||||
private static final String PREF_KEY = "bt_rename_devices";
|
||||
|
||||
@Mock
|
||||
private LocalBluetoothAdapter mLocalAdapter;
|
||||
@@ -66,10 +67,10 @@ public class BluetoothDeviceRenamePreferenceControllerTest {
|
||||
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
mPreference = new Preference(mContext);
|
||||
mPreference.setKey(BluetoothDeviceRenamePreferenceController.PREF_KEY);
|
||||
mPreference.setKey(PREF_KEY);
|
||||
|
||||
mController = new BluetoothDeviceRenamePreferenceController(
|
||||
mContext, mFragment, mLocalAdapter);
|
||||
mContext, PREF_KEY, mFragment, mLocalAdapter);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user