Use FooterPreference in xml explicitly

Removed the FooterPreferenceMixin from the BillingCycleSettings page.

Fixes: 139099367
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datausage
Change-Id: I408e433b3366a617b6c5a6fdb18f4830de4b8287
This commit is contained in:
Sunny Shao
2019-08-08 11:34:49 +08:00
parent 656e4ef701
commit fb695782c5
3 changed files with 7 additions and 8 deletions

View File

@@ -47,8 +47,6 @@ import androidx.preference.SwitchPreference;
import com.android.settings.testutils.shadow.ShadowFragment;
import com.android.settingslib.NetworkPolicyEditor;
import com.android.settingslib.widget.FooterPreference;
import com.android.settingslib.widget.FooterPreferenceMixinCompat;
import org.junit.Before;
import org.junit.Test;
@@ -58,7 +56,6 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.util.ReflectionHelpers;
@RunWith(RobolectricTestRunner.class)
public class BillingCycleSettingsTest {
@@ -162,9 +159,6 @@ public class BillingCycleSettingsTest {
when(mConnectivityManager.isNetworkSupported(anyInt())).thenReturn(true);
final SwitchPreference preference = mock(SwitchPreference.class);
when(billingCycleSettings.findPreference(anyString())).thenReturn(preference);
final FooterPreferenceMixinCompat footer = mock(FooterPreferenceMixinCompat.class);
ReflectionHelpers.setField(billingCycleSettings, "mFooterPreferenceMixin", footer);
when(footer.createFooterPreference()).thenReturn(mock(FooterPreference.class));
billingCycleSettings.onCreate(Bundle.EMPTY);