DO NOT MERGE: Fix test failure in CodeInspectionTest

Change-Id: I74fbd30261fa66636c915936270d873e7612cbc6
Fixes: 70496869
Test: robotests
This commit is contained in:
Fan Zhang
2017-12-15 11:58:56 -08:00
parent 90d284cab7
commit 6be8dfc9b7
2 changed files with 4 additions and 15 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.core.instrumentation;
import static com.google.common.truth.Truth.assertWithMessage;
import android.app.Fragment;
import android.util.ArraySet;
@@ -25,8 +27,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static com.google.common.truth.Truth.assertWithMessage;
/**
* {@link CodeInspector} that verifies all fragments implements Instrumentable.
*/
@@ -67,7 +67,5 @@ public class InstrumentableFragmentCodeInspector extends CodeInspector {
assertWithMessage(sb.toString())
.that(broken.isEmpty())
.isTrue();
assertNoObsoleteInGrandfatherList("grandfather_not_implementing_instrumentable",
grandfather_notImplementingInstrumentable);
}
}

View File

@@ -16,6 +16,8 @@
package com.android.settings.search;
import static com.google.common.truth.Truth.assertWithMessage;
import android.util.ArraySet;
import android.util.Log;
@@ -28,8 +30,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static com.google.common.truth.Truth.assertWithMessage;
/**
* {@link CodeInspector} to ensure fragments implement search components correctly.
*/
@@ -144,15 +144,6 @@ public class SearchIndexProviderCodeInspector extends CodeInspector {
assertWithMessage(notInProviderRegistryError)
.that(notInSearchProviderRegistry)
.isEmpty();
assertNoObsoleteInGrandfatherList("grandfather_not_implementing_indexable",
notImplementingIndexableGrandfatherList);
assertNoObsoleteInGrandfatherList("grandfather_not_implementing_index_provider",
notImplementingIndexProviderGrandfatherList);
assertNoObsoleteInGrandfatherList("grandfather_not_in_search_index_provider_registry",
notInSearchIndexableRegistryGrandfatherList);
assertNoObsoleteInGrandfatherList(
"grandfather_not_sharing_pref_controllers_with_search_provider",
notSharingPrefControllersGrandfatherList);
}
private boolean hasSearchIndexProvider(Class clazz) {