Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6be8dfc9 authored by Fan Zhang's avatar Fan Zhang
Browse files

DO NOT MERGE: Fix test failure in CodeInspectionTest

Change-Id: I74fbd30261fa66636c915936270d873e7612cbc6
Fixes: 70496869
Test: robotests
parent 90d284ca
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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);
    }
}
+2 −11
Original line number Diff line number Diff line
@@ -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) {