Search in sources :

Example 1 with CardDatabaseHelper

use of com.android.settings.homepage.contextualcards.CardDatabaseHelper in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class SliceContextualCardController method onDismissed.

@Override
public void onDismissed(ContextualCard card) {
    ThreadUtils.postOnBackgroundThread(() -> {
        final CardDatabaseHelper dbHelper = CardDatabaseHelper.getInstance(mContext);
        dbHelper.markContextualCardAsDismissed(mContext, card.getName());
    });
    showFeedbackDialog(card);
    final MetricsFeatureProvider metricsFeatureProvider = FeatureFactory.getFactory(mContext).getMetricsFeatureProvider();
    metricsFeatureProvider.action(mContext, SettingsEnums.ACTION_CONTEXTUAL_CARD_DISMISS, ContextualCardLogUtils.buildCardDismissLog(card));
}
Also used : MetricsFeatureProvider(com.android.settingslib.core.instrumentation.MetricsFeatureProvider) CardDatabaseHelper(com.android.settings.homepage.contextualcards.CardDatabaseHelper)

Aggregations

CardDatabaseHelper (com.android.settings.homepage.contextualcards.CardDatabaseHelper)1 MetricsFeatureProvider (com.android.settingslib.core.instrumentation.MetricsFeatureProvider)1