Lines Matching refs:shortcuts
65 "SELECT " + Shortcuts.intent_key.fullName + " FROM " + Shortcuts.TABLE_NAME;
70 Shortcuts.shortcut_id.name() + "=? AND " + Shortcuts.source.name() + "=?";
115 Shortcuts.TABLE_NAME + " ON " + ClickLog.intent_key.fullName + " = " +
116 Shortcuts.intent_key.fullName;
121 Shortcuts.intent_key.fullName,
122 Shortcuts.source.fullName,
123 Shortcuts.source_version_code.fullName,
124 Shortcuts.format.fullName + AS + SearchManager.SUGGEST_COLUMN_FORMAT,
125 Shortcuts.title + AS + SearchManager.SUGGEST_COLUMN_TEXT_1,
126 Shortcuts.description + AS + SearchManager.SUGGEST_COLUMN_TEXT_2,
127 Shortcuts.description_url + AS + SearchManager.SUGGEST_COLUMN_TEXT_2_URL,
128 Shortcuts.icon1 + AS + SearchManager.SUGGEST_COLUMN_ICON_1,
129 Shortcuts.icon2 + AS + SearchManager.SUGGEST_COLUMN_ICON_2,
130 Shortcuts.intent_action + AS + SearchManager.SUGGEST_COLUMN_INTENT_ACTION,
131 Shortcuts.intent_component.fullName,
132 Shortcuts.intent_data + AS + SearchManager.SUGGEST_COLUMN_INTENT_DATA,
133 Shortcuts.intent_query + AS + SearchManager.SUGGEST_COLUMN_QUERY,
134 Shortcuts.intent_extradata + AS + SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA,
135 Shortcuts.shortcut_id + AS + SearchManager.SUGGEST_COLUMN_SHORTCUT_ID,
136 Shortcuts.spinner_while_refreshing + AS +
138 Shortcuts.log_type + AS + CursorBackedSuggestionCursor.SUGGEST_COLUMN_LOG_TYPE,
139 Shortcuts.custom_columns.fullName,
236 db.delete(Shortcuts.TABLE_NAME, Shortcuts.intent_key.fullName + " = ?",
248 db.delete(Shortcuts.TABLE_NAME, null, null);
274 ShortcutCursor shortcuts = getShortcutsForQuery(query, allowedCorpora,
276 Consumers.consumeCloseable(consumer, shortcuts);
362 db.delete(Shortcuts.TABLE_NAME, SHORTCUT_BY_ID_WHERE, whereArgs);
365 db.updateWithOnConflict(Shortcuts.TABLE_NAME, shortcut,
382 mExtrasColumn = cursor.getColumnIndex(Shortcuts.custom_columns.name());
387 int srcCol = mCursor.getColumnIndex(Shortcuts.source.name());
400 int versionCode = mCursor.getInt(Shortcuts.source_version_code.ordinal());
413 int componentCol = mCursor.getColumnIndex(Shortcuts.intent_component.name());
438 // "Remove from history" UI, which is also shown for all shortcuts.
459 * shortcuts in the shortcuts table, which would mean parsing ALL the JSON contained
462 * - All shortcuts are put into a ListSuggestionCursor during the promotion process, so
464 * JSON for shortcuts that are actually displayed.
548 // shortcuts for custom suggestion views work properly.
557 cv.put(Shortcuts.intent_key.name(), intentKey);
558 cv.put(Shortcuts.source.name(), sourceName);
559 cv.put(Shortcuts.source_version_code.name(), source.getVersionCode());
560 cv.put(Shortcuts.format.name(), suggestion.getSuggestionFormat());
561 cv.put(Shortcuts.title.name(), suggestion.getSuggestionText1());
562 cv.put(Shortcuts.description.name(), suggestion.getSuggestionText2());
563 cv.put(Shortcuts.description_url.name(), suggestion.getSuggestionText2Url());
564 cv.put(Shortcuts.icon1.name(), icon1Uri);
565 cv.put(Shortcuts.icon2.name(), icon2Uri);
566 cv.put(Shortcuts.intent_action.name(), intentAction);
567 cv.put(Shortcuts.intent_component.name(), intentComponent);
568 cv.put(Shortcuts.intent_data.name(), intentData);
569 cv.put(Shortcuts.intent_query.name(), intentQuery);
570 cv.put(Shortcuts.intent_extradata.name(), intentExtraData);
571 cv.put(Shortcuts.shortcut_id.name(), suggestion.getShortcutId());
573 cv.put(Shortcuts.spinner_while_refreshing.name(), "true");
575 cv.put(Shortcuts.log_type.name(), suggestion.getSuggestionLogType());
576 cv.put(Shortcuts.custom_columns.name(), extrasJson);
665 String intentKey = shortcut.getAsString(Shortcuts.intent_key.name());
678 db.replaceOrThrow(Shortcuts.TABLE_NAME, null, shortcut);
688 * shortcuts table
690 enum Shortcuts {
710 static final String TABLE_NAME = "shortcuts";
714 Shortcuts() {
785 = Shortcuts.TABLE_NAME + "_" + Shortcuts.shortcut_id.name();
793 = Shortcuts.TABLE_NAME + "_delete";
795 = Shortcuts.TABLE_NAME + "_update_intent_key";
804 // The shortcuts info is not all that important, so we just drop the tables
806 Log.i(TAG, "Upgrading shortcuts DB from version " +
807 + oldVersion + " to " + newVersion + ". This deletes all shortcuts.");
820 db.execSQL("DROP TABLE IF EXISTS " + Shortcuts.TABLE_NAME);
846 db.execSQL("CREATE TABLE " + Shortcuts.TABLE_NAME + " (" +
849 Shortcuts.intent_key.name() + " TEXT NOT NULL COLLATE UNICODE PRIMARY KEY, " +
850 Shortcuts.source.name() + " TEXT NOT NULL, " +
851 Shortcuts.source_version_code.name() + " INTEGER NOT NULL, " +
852 Shortcuts.format.name() + " TEXT, " +
853 Shortcuts.title.name() + " TEXT, " +
854 Shortcuts.description.name() + " TEXT, " +
855 Shortcuts.description_url.name() + " TEXT, " +
856 Shortcuts.icon1.name() + " TEXT, " +
857 Shortcuts.icon2.name() + " TEXT, " +
858 Shortcuts.intent_action.name() + " TEXT, " +
859 Shortcuts.intent_component.name() + " TEXT, " +
860 Shortcuts.intent_data.name() + " TEXT, " +
861 Shortcuts.intent_query.name() + " TEXT, " +
862 Shortcuts.intent_extradata.name() + " TEXT, " +
863 Shortcuts.shortcut_id.name() + " TEXT, " +
864 Shortcuts.spinner_while_refreshing.name() + " TEXT, " +
865 Shortcuts.log_type.name() + " TEXT, " +
866 Shortcuts.custom_columns.name() + " TEXT" +
869 // index for fast lookup of shortcuts by shortcut_id
871 + " ON " + Shortcuts.TABLE_NAME
872 + "(" + Shortcuts.shortcut_id.name() + ", " + Shortcuts.source.name() + ")");
876 // type must match Shortcuts.intent_key
878 + Shortcuts.TABLE_NAME + "(" + Shortcuts.intent_key + "), " +
911 + Shortcuts.TABLE_NAME
915 + " = OLD." + Shortcuts.intent_key.name() + ";"
920 + " AFTER UPDATE ON " + Shortcuts.TABLE_NAME
921 + " WHEN NEW." + Shortcuts.intent_key.name()
922 + " != OLD." + Shortcuts.intent_key.name()
925 + ClickLog.intent_key.name() + " = NEW." + Shortcuts.intent_key.name()
927 + ClickLog.intent_key.name() + " = OLD." + Shortcuts.intent_key.name()