Fix feature flag page animation

- Move add preference code to displayPreference()

Fixes: 143192095
Test: manual
Change-Id: Ib735ecd11fec6a3d45c9743577ea309755d6b010
This commit is contained in:
Raff Tsai
2019-10-23 14:51:28 +08:00
parent 062baadf4e
commit b3b6236e64
2 changed files with 5 additions and 14 deletions

View File

@@ -28,7 +28,6 @@ import static org.mockito.Mockito.when;
import android.content.Context;
import android.os.Build;
import android.os.SystemProperties;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
@@ -77,9 +76,8 @@ public class FeatureFlagPreferenceControllerTest {
@Test
public void onStart_shouldRefreshFeatureFlags() {
mController.onStart();
mController.displayPreference(mScreen);
verify(mCategory).removeAll();
verify(mCategory, atLeastOnce()).addPreference(any(FeatureFlagPreference.class));
}
}