From 5418e292c974529d66e828eb5706e634782b3f5c Mon Sep 17 00:00:00 2001 From: Elliot Sisteron Date: Mon, 5 Feb 2024 12:58:21 +0000 Subject: [PATCH] Fix tests for SecurityAdvancedSettings. It seems these tests have been failing for a while (probably they were never passing in the first place; as the issue appears to be with the tests and not the prod code). Are they not being run on pre and/or post-submit? Bug: 323650746 Change-Id: I97db7183898930792d1ff0d2de592f26f8b78b01 Test: atest SecurityAdvancedSettingsTest --- .../android/settings/security/SecurityAdvancedSettingsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/src/com/android/settings/security/SecurityAdvancedSettingsTest.java b/tests/unit/src/com/android/settings/security/SecurityAdvancedSettingsTest.java index 9851a1a70df..31f7878e235 100644 --- a/tests/unit/src/com/android/settings/security/SecurityAdvancedSettingsTest.java +++ b/tests/unit/src/com/android/settings/security/SecurityAdvancedSettingsTest.java @@ -107,7 +107,7 @@ public class SecurityAdvancedSettingsTest { @Test public void whenSafetyCenterIsEnabled_pageIndexExcluded() throws Exception { - when(mSafetyCenterManagerWrapper.isEnabled(any())).thenReturn(false); + when(mSafetyCenterManagerWrapper.isEnabled(any())).thenReturn(true); BaseSearchIndexProvider indexProvider = SecurityAdvancedSettings.SEARCH_INDEX_DATA_PROVIDER; List allXmlKeys = TestUtils.getAllXmlKeys(mContext, indexProvider);