Use FooterPreference in xml explicitly

- Removed the FooterPreferenceMixin from the BluetoothDetailsMacAddressController.
 - Added the common api addFooterPreference.

Fixes: 139104386
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: Iab40fa4c5be674290b1dc6d372c84609ccc2ea49
This commit is contained in:
Sunny Shao
2019-08-08 15:43:38 +08:00
parent 656e4ef701
commit 660b36e061
4 changed files with 83 additions and 48 deletions

View File

@@ -15,8 +15,11 @@
*/
package com.android.settings.bluetooth;
import static com.android.settings.bluetooth.BluetoothDetailsMacAddressController.KEY_DEVICE_DETAILS_FOOTER;
import static com.google.common.truth.Truth.assertThat;
import com.android.settings.Utils;
import com.android.settingslib.widget.FooterPreference;
import org.junit.Test;
@@ -25,7 +28,6 @@ import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class BluetoothDetailsMacAddressControllerTest extends BluetoothDetailsControllerTestBase {
private BluetoothDetailsMacAddressController mController;
@Override
@@ -34,6 +36,7 @@ public class BluetoothDetailsMacAddressControllerTest extends BluetoothDetailsCo
mController =
new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice, mLifecycle);
setupDevice(mDeviceConfig);
Utils.addFooterPreference(mContext, mScreen, KEY_DEVICE_DETAILS_FOOTER, null /* title */);
}
@Test