1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License
15  */
16 
17 package com.android.settings.homepage.contextualcards;
18 
19 import android.content.Context;
20 import android.database.Cursor;
21 
22 /** Feature provider for the contextual card feature. */
23 public interface ContextualCardFeatureProvider {
24     /** Get contextual cards from the card provider */
getContextualCards()25     Cursor getContextualCards();
26 
27     /**
28      * Mark a specific {@link ContextualCard} as dismissed with dismissal signal in the database
29      * to indicate that the card has been dismissed.
30      *
31      * @param context  Context
32      * @param cardName The card name of the ContextualCard which is dismissed by user.
33      * @return The number of rows updated
34      */
markCardAsDismissed(Context context, String cardName)35     int markCardAsDismissed(Context context, String cardName);
36 }
37