Lines Matching refs:SHORTCUT
51 * and allows choosing a new bookmark for a shortcut.
68 Bookmarks.SHORTCUT, Bookmarks.TITLE, Bookmarks.INTENT
70 private static final String sShortcutSelection = Bookmarks.SHORTCUT + "=?";
82 /** Preference category to hold the shortcut preferences. */
84 /** Mapping of a shortcut to its preference. */
87 /** The bookmark title of the shortcut that is being cleared. */
90 /** The shortcut that is being cleared. */
157 // Create the dialog for clearing a shortcut
182 // Clear the shortcut
189 private void clearShortcut(char shortcut) {
191 new String[] { String.valueOf((int) shortcut) });
198 // Open the screen to pick a bookmark for this shortcut
209 // Open the clear shortcut dialog
224 // Returned from the 'pick bookmark for this shortcut' screen
230 char shortcut = data.getCharExtra(BookmarkPicker.EXTRA_SHORTCUT, (char) 0);
231 updateShortcut(shortcut, data);
238 private void updateShortcut(char shortcut, Intent intent) {
239 // Update the bookmark for a shortcut
242 Bookmarks.add(getContentResolver(), intent, "", DEFAULT_BOOKMARK_FOLDER, shortcut, 0);
245 private ShortcutPreference getOrCreatePreference(char shortcut) {
246 ShortcutPreference pref = mShortcutToPreference.get(shortcut);
250 Log.w(TAG, "Unknown shortcut '" + shortcut + "', creating preference anyway");
251 return createPreference(shortcut);
255 private ShortcutPreference createPreference(char shortcut) {
256 ShortcutPreference pref = new ShortcutPreference(getActivity(), shortcut);
258 mShortcutToPreference.put(shortcut, pref);
264 /** Whether the shortcut has been seen already. The array index is the shortcut. */
271 char shortcut = (char) Character.toLowerCase(keyMap.getDisplayLabel(keyCode));
272 if (shortcut == 0 || shortcutSeen.get(shortcut, false)) continue;
275 if (!Character.isLetterOrDigit(shortcut)) continue;
276 shortcutSeen.put(shortcut, true);
278 createPreference(shortcut);
302 char shortcut = Character.toLowerCase((char) c.getInt(COLUMN_SHORTCUT));
303 if (shortcut == 0) continue;
305 ShortcutPreference pref = getOrCreatePreference(shortcut);
328 String.valueOf(shortcut)));
331 newBookmarkedShortcuts.put(shortcut, true);
335 noLongerBookmarkedShortcuts.put(shortcut, false);
342 // True, so there is no longer a bookmark for this shortcut
343 char shortcut = (char) noLongerBookmarkedShortcuts.keyAt(i);
344 ShortcutPreference pref = mShortcutToPreference.get(shortcut);