Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 771a0c04 authored by Jason Chiu's avatar Jason Chiu
Browse files

Eliminate the injection flicker while navigating back

For the title/summary uri, do not set the placeholder when it already
has content. This can avoid clearing the text before re-rendering.

Test: robotest, visual
Fix: 256657256
Change-Id: I0518f5247fd2acf6a5eaa63f0f363275103a79af
parent 8e3c46b1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -260,7 +260,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
                META_DATA_PREFERENCE_TITLE_URI)) {
            // Set a placeholder title before starting to fetch real title, this is necessary
            // to avoid preference height change.
            if (preference.getTitle() == null) {
                preference.setTitle(R.string.summary_placeholder);
            }

            final Uri uri = TileUtils.getCompleteUri(tile, META_DATA_PREFERENCE_TITLE_URI,
                    METHOD_GET_DYNAMIC_TITLE);
@@ -288,7 +290,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
                && tile.getMetaData().containsKey(META_DATA_PREFERENCE_SUMMARY_URI)) {
            // Set a placeholder summary before starting to fetch real summary, this is necessary
            // to avoid preference height change.
            if (preference.getSummary() == null) {
                preference.setSummary(R.string.summary_placeholder);
            }

            final Uri uri = TileUtils.getCompleteUri(tile, META_DATA_PREFERENCE_SUMMARY_URI,
                    METHOD_GET_DYNAMIC_SUMMARY);