Merge "Make sure we do not make UI calls from background thread in DashboardSummary class." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-15 18:07:56 +00:00
committed by Android (Google) Code Review

View File

@@ -276,7 +276,7 @@ public class DashboardSummary extends InstrumentedFragment
mSummaryLoader.updateSummaryToCache(category); mSummaryLoader.updateSummaryToCache(category);
mStagingCategory = category; mStagingCategory = category;
if (mSuggestionControllerMixin == null) { if (mSuggestionControllerMixin == null) {
mAdapter.setCategory(mStagingCategory); ThreadUtils.postOnMainThread(() -> mAdapter.setCategory(mStagingCategory));
return; return;
} }
if (mSuggestionControllerMixin.isSuggestionLoaded()) { if (mSuggestionControllerMixin.isSuggestionLoaded()) {