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

@@ -20,9 +20,12 @@ import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.location.LocationManager;
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;
@@ -43,6 +46,13 @@ public class TopLevelLocationPreferenceControllerTest {
mLocationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
}
@After
public void tearDown() {
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.SILKY_HOME)) {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, false);
}
}
@Test
public void isAvailable_byDefault_shouldReturnTrue() {
assertThat(mController.isAvailable()).isTrue();
@@ -83,4 +93,11 @@ public class TopLevelLocationPreferenceControllerTest {
R.plurals.location_settings_summary_location_on,
LOCATION_APP_COUNT, LOCATION_APP_COUNT));
}
@Test
public void getSummary_silkyHomeEnabled_shouldBeNull() {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, true);
assertThat(mController.getSummary()).isNull();
}
}