Reserve full indexing for SearchFragment

Full Index should only be accessible from Search Fragment,
and when only full index should declare a locale to be
indexed.

Test: make RunSettingsRoboTests
Fixes: 36656637
Change-Id: Ie673067118ac6b184570e116ea24a169be027053
This commit is contained in:
Matthew Fritze
2017-03-27 17:42:36 -07:00
parent 88b57826f5
commit 8a42b074a7
8 changed files with 65 additions and 115 deletions

View File

@@ -741,8 +741,15 @@ public class DatabaseIndexingManagerTest {
}
@Test
public void testLocaleUpdated_afterIndexing_localeAdded() {
public void testLocaleUpdated_afterIndexing_localeNotAdded() {
mManager.updateDatabase(false, localeStr);
assertThat(IndexDatabaseHelper.getInstance(mContext)
.isLocaleAlreadyIndexed(mContext, localeStr)).isFalse();
}
@Test
public void testLocaleUpdated_afterFullIndexing_localeAdded() {
mManager.performIndexing();
assertThat(IndexDatabaseHelper.getInstance(mContext)
.isLocaleAlreadyIndexed(mContext, localeStr)).isTrue();
}