Remove subtitles for the homepage IA

Remove the summary of the homepage IA if silky home enabled.

Fixes: 170933968
Test: robotest & visual with turning on/off silky home
Change-Id: I502b6590cece9b80e9923109fe0582cc4d9a1c56
This commit is contained in:
Yanting Yang
2020-10-15 16:46:20 +08:00
parent 886fe1e6ab
commit 9aa4a5463f
21 changed files with 260 additions and 16 deletions

View File

@@ -22,9 +22,12 @@ import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.util.FeatureFlagUtils;
import com.android.settings.R;
import com.android.settings.core.FeatureFlags;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -46,6 +49,13 @@ public class TopLevelConnectedDevicesPreferenceControllerTest {
mController = new TopLevelConnectedDevicesPreferenceController(mContext, "test_key");
}
@After
public void tearDown() {
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.SILKY_HOME)) {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, false);
}
}
@Test
public void getAvailibilityStatus_availableByDefault() {
assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
@@ -64,6 +74,13 @@ public class TopLevelConnectedDevicesPreferenceControllerTest {
.isEqualTo(mContext.getText(R.string.settings_label_launcher));
}
@Test
public void getSummary_silkyHomeEnabled_shouldBeNull() {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, true);
assertThat(mController.getSummary()).isNull();
}
@Implements(AdvancedConnectedDeviceController.class)
private static class ShadowAdvancedConnectedDeviceController {