Use FooterPreference in AccountSyncSettings page
.Use the new FooterPreference and removed the old FooterPreferenceMixin from the AccountSyncSettings page. .Add the ShadowAuthenticationHelper for commnon shadow util. Fixes: 138978130 Test: manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accounts Change-Id: I93ae46b3b66e7e504320a9ed120ab7948dd06423
This commit is contained in:
@@ -36,7 +36,7 @@ import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.testutils.FakeFeatureFactory;
|
||||
import com.android.settingslib.accounts.AuthenticatorHelper;
|
||||
import com.android.settings.testutils.shadow.ShadowAuthenticationHelper;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.widget.LayoutPreference;
|
||||
|
||||
@@ -48,11 +48,9 @@ import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.robolectric.annotation.Implementation;
|
||||
import org.robolectric.annotation.Implements;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = AccountHeaderPreferenceControllerTest.ShadowAuthenticatorHelper.class)
|
||||
@Config(shadows = ShadowAuthenticationHelper.class)
|
||||
public class AccountHeaderPreferenceControllerTest {
|
||||
|
||||
@Mock
|
||||
@@ -109,12 +107,4 @@ public class AccountHeaderPreferenceControllerTest {
|
||||
|
||||
assertThat(label).isEqualTo(account.name);
|
||||
}
|
||||
|
||||
@Implements(AuthenticatorHelper.class)
|
||||
public static class ShadowAuthenticatorHelper {
|
||||
@Implementation
|
||||
protected void onAccountsUpdated(Account[] accounts) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user