packages/apps/Settings
Révision | 28b05910d8f796dd1423b4b20196b2edad46795f (tree) |
---|---|
l'heure | 2020-09-24 21:32:20 |
Auteur | TreeHugger Robot <treehugger-gerrit@goog...> |
Commiter | Android (Google) Code Review |
Merge "Guard against flickering of dynamic injection items" into rvc-qpr-dev
@@ -248,7 +248,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { | ||
248 | 248 | final Map<String, IContentProvider> providerMap = new ArrayMap<>(); |
249 | 249 | final String titleFromUri = TileUtils.getTextFromUri( |
250 | 250 | mContext, uri, providerMap, META_DATA_PREFERENCE_TITLE); |
251 | - ThreadUtils.postOnMainThread(() -> preference.setTitle(titleFromUri)); | |
251 | + if (!TextUtils.equals(titleFromUri, preference.getTitle())) { | |
252 | + ThreadUtils.postOnMainThread(() -> preference.setTitle(titleFromUri)); | |
253 | + } | |
252 | 254 | }); |
253 | 255 | } |
254 | 256 |
@@ -277,7 +279,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { | ||
277 | 279 | final Map<String, IContentProvider> providerMap = new ArrayMap<>(); |
278 | 280 | final String summaryFromUri = TileUtils.getTextFromUri( |
279 | 281 | mContext, uri, providerMap, META_DATA_PREFERENCE_SUMMARY); |
280 | - ThreadUtils.postOnMainThread(() -> preference.setSummary(summaryFromUri)); | |
282 | + if (!TextUtils.equals(summaryFromUri, preference.getSummary())) { | |
283 | + ThreadUtils.postOnMainThread(() -> preference.setSummary(summaryFromUri)); | |
284 | + } | |
281 | 285 | }); |
282 | 286 | } |
283 | 287 |