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:
@@ -23,7 +23,11 @@ import static com.android.settings.fuelgauge.TopLevelBatteryPreferenceController
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.FeatureFlagUtils;
|
||||
|
||||
import com.android.settings.core.FeatureFlags;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -42,6 +46,13 @@ public class TopLevelBatteryPreferenceControllerTest {
|
||||
mController = new TopLevelBatteryPreferenceController(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);
|
||||
@@ -66,4 +77,11 @@ public class TopLevelBatteryPreferenceControllerTest {
|
||||
info.chargeLabel = "5% - charging";
|
||||
assertThat(getDashboardLabel(mContext, info)).isEqualTo("5% - charging");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSummary_silkyHomeEnabled_shouldBeNull() {
|
||||
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, true);
|
||||
|
||||
assertThat(mController.getSummary()).isNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user