For dismissal mechanism, we will have to get information about those
dismissed cards that are stored in Card DB with flag "dismiss" to filter
them out. Currently we only do the entire loading in fragment's
onCreate(), so only when the fragment is recreated users can get the new
data. Now we are changing it to onStart() and make the loader restart so
we are able to show the latest cards.
Change-Id: I4c0be297232f026b46feb8084084816e1acc8f11
Fixes:
119090460
Bug:
113783548
Test: visual
final CardContentLoaderCallbacks cardContentLoaderCallbacks =
new CardContentLoaderCallbacks(mContext);
cardContentLoaderCallbacks.setListener(this);
- LoaderManager.getInstance(fragment).initLoader(CARD_CONTENT_LOADER_ID, null /* bundle */,
+ LoaderManager.getInstance(fragment).restartLoader(CARD_CONTENT_LOADER_ID, null /* bundle */,
cardContentLoaderCallbacks);
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContextualCardManager = new ContextualCardManager(getContext(), getSettingsLifecycle());
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
mContextualCardManager.loadContextualCards(this);
}