Fix the unaligned title of injected items
Remove the summary space holder for the injected items that are not assigned a summary or a summary uri. Test: visual, robotest Fixes: 187006845 Bug: 182357397 Change-Id: I7b3d165f0ffd771dd0110962c9e3159c4977d6e3
This commit is contained in:
@@ -280,8 +280,6 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
||||
METHOD_GET_DYNAMIC_SUMMARY);
|
||||
refreshSummary(uri, preference);
|
||||
return createDynamicDataObserver(METHOD_GET_DYNAMIC_SUMMARY, uri, preference);
|
||||
} else {
|
||||
preference.setSummary(R.string.summary_placeholder);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -285,7 +285,7 @@ public class DashboardFeatureProviderImplTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void bindPreference_noSummary_shouldSetSummaryToPlaceholder() {
|
||||
public void bindPreference_noSummary_shouldSetNullSummary() {
|
||||
final Preference preference = new Preference(RuntimeEnvironment.application);
|
||||
mActivityInfo.metaData.remove(META_DATA_PREFERENCE_SUMMARY);
|
||||
|
||||
@@ -295,8 +295,7 @@ public class DashboardFeatureProviderImplTest {
|
||||
MetricsEvent.VIEW_UNKNOWN, preference, tile, null /*key */,
|
||||
Preference.DEFAULT_ORDER);
|
||||
|
||||
assertThat(preference.getSummary())
|
||||
.isEqualTo(RuntimeEnvironment.application.getString(R.string.summary_placeholder));
|
||||
assertThat(preference.getSummary()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user