Remove code that check for dashboard feature.

- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
This commit is contained in:
Doris Ling
2017-03-03 17:12:47 -08:00
parent 50aa0008fc
commit f2cf2aea37
53 changed files with 155 additions and 813 deletions

View File

@@ -15,44 +15,30 @@
*/
package com.android.settings.connecteddevice;
import android.content.Context;
import android.provider.SearchIndexableResource;
import com.android.settings.SettingsRobolectricTestRunner;
import com.android.settings.TestConfig;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settingslib.drawer.CategoryKey;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Answers;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowApplication;
import java.util.List;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;
@RunWith(SettingsRobolectricTestRunner.class)
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
public class ConnectedDeviceDashboardFragmentTest {
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private Context mContext;
private ConnectedDeviceDashboardFragment mFragment;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
FakeFeatureFactory.setupForTest(mContext);
final FakeFeatureFactory factory =
(FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext);
when(factory.dashboardFeatureProvider.isEnabled()).thenReturn(true);
mFragment = new ConnectedDeviceDashboardFragment();
}