Fix failure of ZenModeAutomaticRulesPreferenceControllerTest

Running ZenModeAutomaticRulesPreferenceControllerTest fails due to
missing field "DEFAULT_RULE_IDS".

"mDefaultRuleIds" should be used instead of it.

Bug: 63077372
Test: make \
    ROBOTEST_FILTER=ZenModeAutomaticRulesPreferenceControllerTest \
    RunSettingsRoboTests

Change-Id: Ieb4a4304a0404685e4a50eb3a5c863a0132ebf7d
This commit is contained in:
Jaekyun Seok
2017-12-07 19:46:41 +09:00
parent e677f49328
commit b000ace0eb

View File

@@ -82,7 +82,7 @@ public class ZenModeAutomaticRulesPreferenceControllerTest {
mock(Lifecycle.class)); mock(Lifecycle.class));
ReflectionHelpers.setField(mController, "mBackend", mBackend); ReflectionHelpers.setField(mController, "mBackend", mBackend);
ReflectionHelpers.setField(mController, "DEFAULT_RULE_IDS", mDefaultIds); ReflectionHelpers.setField(mController, "mDefaultRuleIds", mDefaultIds);
when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn( when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(
mockPref); mockPref);