From 49ffd8f39f890c72495db4be8f4171e338393a7d Mon Sep 17 00:00:00 2001 From: Sunny Shao Date: Thu, 15 Aug 2019 16:28:35 +0800 Subject: [PATCH] Use FooterPreference in xml explicitly Removed the FooterPreferenceMixin from the BluetoothDashboardFragment page. Fixes: 139459430 Test: manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.connecteddevice Change-Id: I8a8b6ba656405f938e203e20e5973c1560c3a35a --- res/xml/bluetooth_screen.xml | 4 ++++ .../settings/connecteddevice/BluetoothDashboardFragment.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/res/xml/bluetooth_screen.xml b/res/xml/bluetooth_screen.xml index 42f71b3a864..2a52a7cf369 100644 --- a/res/xml/bluetooth_screen.xml +++ b/res/xml/bluetooth_screen.xml @@ -36,4 +36,8 @@ settings:useAdminDisabledSummary="true" settings:controller="com.android.settings.connecteddevice.AddDevicePreferenceController"/> + \ No newline at end of file diff --git a/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java b/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java index ecbda15bd2f..36b2ae8c007 100644 --- a/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java +++ b/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java @@ -46,6 +46,7 @@ import java.util.List; public class BluetoothDashboardFragment extends DashboardFragment { private static final String TAG = "BluetoothDashboardFrag"; + private static final String KEY_BLUETOOTH_SCREEN_FOOTER = "bluetooth_screen_footer"; public static final String KEY_BLUETOOTH_SCREEN = "bluetooth_switchbar_screen"; private FooterPreference mFooterPreference; @@ -75,7 +76,7 @@ public class BluetoothDashboardFragment extends DashboardFragment { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); - mFooterPreference = mFooterPreferenceMixin.createFooterPreference(); + mFooterPreference = findPreference(KEY_BLUETOOTH_SCREEN_FOOTER); } @Override