Home
last modified time | relevance | path

Searched refs:CardDatabaseHelper (Results 1 – 8 of 8) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DCardContentProviderTest.java61 .path(CardDatabaseHelper.CARD_TABLE) in setUp()
68 CardDatabaseHelper.getInstance(mContext).close(); in cleanUp()
69 CardDatabaseHelper.sCardDatabaseHelper = null; in cleanUp()
134 values.put(CardDatabaseHelper.CardColumns.SCORE, updatingScore); in cardData_update()
135 final String strWhere = CardDatabaseHelper.CardColumns.NAME + "=?"; in cardData_update()
202 values.put(CardDatabaseHelper.CardColumns.NAME, "auto_rotate"); in generateOneRow()
203 values.put(CardDatabaseHelper.CardColumns.TYPE, 1); in generateOneRow()
204 values.put(CardDatabaseHelper.CardColumns.SCORE, 0.9); in generateOneRow()
205 values.put(CardDatabaseHelper.CardColumns.SLICE_URI, in generateOneRow()
207 values.put(CardDatabaseHelper.CardColumns.CATEGORY, 2); in generateOneRow()
[all …]
DContextualCardFeatureProviderImplTest.java48 private CardDatabaseHelper mCardDatabaseHelper;
57 mCardDatabaseHelper = CardDatabaseHelper.getInstance(mContext); in setUp()
63 CardDatabaseHelper.getInstance(mContext).close(); in tearDown()
64 CardDatabaseHelper.sCardDatabaseHelper = null; in tearDown()
111 value.put(CardDatabaseHelper.CardColumns.NAME, name); in insertFakeCard()
112 value.put(CardDatabaseHelper.CardColumns.SCORE, score); in insertFakeCard()
113 value.put(CardDatabaseHelper.CardColumns.SLICE_URI, uri); in insertFakeCard()
114 value.put(CardDatabaseHelper.CardColumns.TYPE, ContextualCard.CardType.SLICE); in insertFakeCard()
115 value.put(CardDatabaseHelper.CardColumns.CATEGORY, in insertFakeCard()
117 value.put(CardDatabaseHelper.CardColumns.PACKAGE_NAME, in insertFakeCard()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/homepage/contextualcards/
DCardDatabaseHelperTest.java37 private CardDatabaseHelper mCardDatabaseHelper;
43 mCardDatabaseHelper = CardDatabaseHelper.getInstance(mContext); in setUp()
49 CardDatabaseHelper.getInstance(mContext).close(); in cleanUp()
50 CardDatabaseHelper.sCardDatabaseHelper = null; in cleanUp()
55 final Cursor cursor = mDatabase.rawQuery("SELECT * FROM " + CardDatabaseHelper.CARD_TABLE, in testDatabaseSchema()
60 CardDatabaseHelper.CardColumns.NAME, in testDatabaseSchema()
61 CardDatabaseHelper.CardColumns.TYPE, in testDatabaseSchema()
62 CardDatabaseHelper.CardColumns.SCORE, in testDatabaseSchema()
63 CardDatabaseHelper.CardColumns.SLICE_URI, in testDatabaseSchema()
64 CardDatabaseHelper.CardColumns.CATEGORY, in testDatabaseSchema()
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DContextualCardFeatureProviderImpl.java19 import static com.android.settings.homepage.contextualcards.CardDatabaseHelper.CARD_TABLE;
44 final SQLiteDatabase db = CardDatabaseHelper.getInstance(mContext).getReadableDatabase(); in getContextualCards()
47 final String selection = CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP + " < ? OR " in getContextualCards()
48 + CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP + " IS NULL"; in getContextualCards()
52 CardDatabaseHelper.CardColumns.SCORE + " DESC" /* orderBy */); in getContextualCards()
59 final SQLiteDatabase db = CardDatabaseHelper.getInstance(mContext).getWritableDatabase(); in markCardAsDismissed()
61 values.put(CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP, System.currentTimeMillis()); in markCardAsDismissed()
62 final String selection = CardDatabaseHelper.CardColumns.NAME + "=?"; in markCardAsDismissed()
72 CardDatabaseHelper.getInstance(mContext).getWritableDatabase(); in resetDismissedTime()
74 values.putNull(CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP); in resetDismissedTime()
[all …]
DCardContentProvider.java49 .appendPath(CardDatabaseHelper.CARD_TABLE)
55 .appendPath(CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP)
65 URI_MATCHER.addURI(CARD_AUTHORITY, CardDatabaseHelper.CARD_TABLE, MATCH_CARDS); in URI_MATCHER.addURI()
84 final CardDatabaseHelper DBHelper = CardDatabaseHelper.getInstance(getContext()); in bulkInsert()
98 final String[] columns = new String[]{CardDatabaseHelper.CardColumns.NAME, in bulkInsert()
99 CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP}; in bulkInsert()
101 CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP + " IS NOT NULL"; in bulkInsert()
108 CardDatabaseHelper.CardColumns.NAME)); in bulkInsert()
110 CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP)); in bulkInsert()
123 value.get(CardDatabaseHelper.CardColumns.NAME).toString(); in bulkInsert()
[all …]
DCardDatabaseHelper.java29 public class CardDatabaseHelper extends SQLiteOpenHelper { class
100 public CardDatabaseHelper(Context context) { in CardDatabaseHelper() method in CardDatabaseHelper
119 static CardDatabaseHelper sCardDatabaseHelper;
121 public static synchronized CardDatabaseHelper getInstance(Context context) { in getInstance()
123 sCardDatabaseHelper = new CardDatabaseHelper(context.getApplicationContext()); in getInstance()
DContextualCard.java161 mName = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.NAME)); in ContextualCard()
163 mCardType = c.getInt(c.getColumnIndex(CardDatabaseHelper.CardColumns.TYPE)); in ContextualCard()
165 mRankingScore = c.getDouble(c.getColumnIndex(CardDatabaseHelper.CardColumns.SCORE)); in ContextualCard()
167 mSliceUri = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.SLICE_URI)); in ContextualCard()
169 mCategory = c.getInt(c.getColumnIndex(CardDatabaseHelper.CardColumns.CATEGORY)); in ContextualCard()
171 mPackageName = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.PACKAGE_NAME)); in ContextualCard()
173 mAppVersion = c.getLong(c.getColumnIndex(CardDatabaseHelper.CardColumns.APP_VERSION)); in ContextualCard()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardControllerTest.java39 import com.android.settings.homepage.contextualcards.CardDatabaseHelper;
92 CardDatabaseHelper.getInstance(mContext).close(); in tearDown()
105 final String[] columns = {CardDatabaseHelper.CardColumns.DISMISSED_TIMESTAMP}; in onDismissed_cardShouldBeMarkedAsDismissedWithTimestamp()
106 final String selection = CardDatabaseHelper.CardColumns.NAME + "=?"; in onDismissed_cardShouldBeMarkedAsDismissedWithTimestamp()
183 values.put(CardDatabaseHelper.CardColumns.NAME, TEST_CARD_NAME); in generateOneRow()
184 values.put(CardDatabaseHelper.CardColumns.TYPE, 1); in generateOneRow()
185 values.put(CardDatabaseHelper.CardColumns.SCORE, 0.9); in generateOneRow()
186 values.put(CardDatabaseHelper.CardColumns.SLICE_URI, TEST_SLICE_URI); in generateOneRow()
187 values.put(CardDatabaseHelper.CardColumns.CATEGORY, 2); in generateOneRow()
188 values.put(CardDatabaseHelper.CardColumns.PACKAGE_NAME, "com.android.settings"); in generateOneRow()
[all …]