Adding the dismiss logic for setting smart suggestions.

Test: make RunSettingsLibRoboTests
Fixes: 35059823
Change-Id: I48a71ff525f6dded6f0b505280f5678a554f7183
This commit is contained in:
Soroosh Mariooryad
2017-01-31 13:28:38 -08:00
parent ebccf8d093
commit 81adc530d9
2 changed files with 7 additions and 3 deletions

View File

@@ -183,7 +183,9 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
if (mSuggestionParser == null) {
return;
}
if (mSuggestionParser.dismissSuggestion(suggestion)) {
boolean isSmartSuggestionEnabled = FeatureFactory.getFactory(mContext)
.getSuggestionFeatureProvider().isSmartSuggestionEnabled(mContext);
if (mSuggestionParser.dismissSuggestion(suggestion, isSmartSuggestionEnabled)) {
mContext.getPackageManager().setComponentEnabledSetting(
suggestion.intent.getComponent(),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,