Home
last modified time | relevance | path

Searched refs:Favorites (Results 1 – 25 of 59) sorted by relevance

123

/packages/apps/Launcher3/src/com/android/launcher3/provider/
DImportDataTask.java43 import com.android.launcher3.LauncherSettings.Favorites;
81 mOtherFavoritesUri = Uri.parse("content://" + sourceAuthority + "/" + Favorites.TABLE_NAME); in ImportDataTask()
133 Favorites.PROFILE_ID + " = ?", new String[]{profileId}, in importWorkspaceItems()
136 Favorites.CONTAINER + " , " + Favorites.SCREEN)) { in importWorkspaceItems()
139 final int idIndex = c.getColumnIndexOrThrow(Favorites._ID); in importWorkspaceItems()
140 final int intentIndex = c.getColumnIndexOrThrow(Favorites.INTENT); in importWorkspaceItems()
141 final int titleIndex = c.getColumnIndexOrThrow(Favorites.TITLE); in importWorkspaceItems()
142 final int containerIndex = c.getColumnIndexOrThrow(Favorites.CONTAINER); in importWorkspaceItems()
143 final int itemTypeIndex = c.getColumnIndexOrThrow(Favorites.ITEM_TYPE); in importWorkspaceItems()
144 final int widgetProviderIndex = c.getColumnIndexOrThrow(Favorites.APPWIDGET_PROVIDER); in importWorkspaceItems()
[all …]
DRestoreDbTask.java38 import com.android.launcher3.LauncherSettings.Favorites;
116 int itemsDeleted = db.delete(Favorites.TABLE_NAME, whereClause.toString(), profileIds); in sanitizeDB()
124 values.put(Favorites.RESTORED, WorkspaceItemInfo.FLAG_RESTORED_ICON in sanitizeDB()
126 db.update(Favorites.TABLE_NAME, values, null, null); in sanitizeDB()
129 values.put(Favorites.RESTORED, LauncherAppWidgetInfo.FLAG_ID_NOT_VALID | in sanitizeDB()
133 db.update(Favorites.TABLE_NAME, values, "itemType = ?", in sanitizeDB()
134 new String[]{Integer.toString(Favorites.ITEM_TYPE_APPWIDGET)}); in sanitizeDB()
173 values.put(Favorites.PROFILE_ID, newProfileId); in migrateProfileId()
174 db.update(Favorites.TABLE_NAME, values, "profileId = ?", in migrateProfileId()
179 Favorites.addTableToDb(db, newProfileId, false); in migrateProfileId()
[all …]
DLauncherDbUtils.java28 import com.android.launcher3.LauncherSettings.Favorites;
53 Favorites.SCREEN, Favorites.TABLE_NAME, Favorites.CONTAINER, in prepareScreenZeroToHostQsb()
54 Favorites.CONTAINER_DESKTOP), null)) { in prepareScreenZeroToHostQsb()
71 if (DatabaseUtils.queryNumEntries(db, Favorites.TABLE_NAME, in prepareScreenZeroToHostQsb()
91 values.put(Favorites.SCREEN, newScreen); in renameScreen()
92 db.update(Favorites.TABLE_NAME, values, "container = -100 and screen = ?", whereParams); in renameScreen()
DLossyScreenMigrationTask.java26 import com.android.launcher3.LauncherSettings.Favorites;
84 mDb.update(Favorites.TABLE_NAME, tempValues, "_id = ?", in migrateScreen0()
95 mDb.delete(Favorites.TABLE_NAME, in migrateScreen0()
96 Utilities.createDbSelectionQuery(Favorites._ID, mEntryToRemove), null); in migrateScreen0()
/packages/apps/Launcher3/src/com/android/launcher3/model/
DGridSizeMigrationTask.java25 import com.android.launcher3.LauncherSettings.Favorites;
123 mDb.update(Favorites.TABLE_NAME, mUpdateOperations.valueAt(i),
131 mDb.delete(Favorites.TABLE_NAME, Utilities.createDbSelectionQuery(
132 Favorites._ID, mEntryToRemove), null);
186 return LauncherDbUtils.queryIntArray(db, Favorites.TABLE_NAME, Favorites.SCREEN,
187 Favorites.CONTAINER + " = " + Favorites.CONTAINER_DESKTOP,
188 Favorites.SCREEN, Favorites.SCREEN);
607 Favorites._ID, // 0
608 Favorites.ITEM_TYPE, // 1
609 Favorites.INTENT, // 2
[all …]
DModelWriter.java37 import com.android.launcher3.LauncherSettings.Favorites;
90 if (container == Favorites.CONTAINER_HOTSEAT) { in updateItemInfoProps()
157 .put(Favorites.CONTAINER, item.container) in moveItemInDatabase()
158 .put(Favorites.CELLX, item.cellX) in moveItemInDatabase()
159 .put(Favorites.CELLY, item.cellY) in moveItemInDatabase()
160 .put(Favorites.RANK, item.rank) in moveItemInDatabase()
161 .put(Favorites.SCREEN, item.screenId))); in moveItemInDatabase()
177 values.put(Favorites.CONTAINER, item.container); in moveItemsInDatabase()
178 values.put(Favorites.CELLX, item.cellX); in moveItemsInDatabase()
179 values.put(Favorites.CELLY, item.cellY); in moveItemsInDatabase()
[all …]
DLoaderCursor.java106 iconIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.ICON); in LoaderCursor()
107 iconPackageIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.ICON_PACKAGE); in LoaderCursor()
108 iconResourceIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.ICON_RESOURCE); in LoaderCursor()
109 titleIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.TITLE); in LoaderCursor()
111 idIndex = getColumnIndexOrThrow(LauncherSettings.Favorites._ID); in LoaderCursor()
112 containerIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.CONTAINER); in LoaderCursor()
113 itemTypeIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.ITEM_TYPE); in LoaderCursor()
114 screenIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.SCREEN); in LoaderCursor()
115 cellXIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.CELLX); in LoaderCursor()
116 cellYIndex = getColumnIndexOrThrow(LauncherSettings.Favorites.CELLY); in LoaderCursor()
[all …]
DBgDataModel.java128 if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in collectWorkspaceScreens()
193 if (fInfo.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto()
195 } else if (fInfo.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto()
207 if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto()
209 } else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto()
217 if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto()
219 } else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto()
261 case LauncherSettings.Favorites.ITEM_TYPE_FOLDER: in removeItem()
276 case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: { in removeItem()
287 case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION: in removeItem()
[all …]
DGridBackupTable.java18 import static com.android.launcher3.LauncherSettings.Favorites.BACKUP_TABLE_NAME;
30 import com.android.launcher3.LauncherSettings.Favorites;
43 private static final String KEY_HOTSEAT_SIZE = Favorites.SCREEN;
44 private static final String KEY_GRID_X_SIZE = Favorites.SPANX;
45 private static final String KEY_GRID_Y_SIZE = Favorites.SPANY;
46 private static final String KEY_DB_VERSION = Favorites.RANK;
78 copyTable(Favorites.TABLE_NAME, BACKUP_TABLE_NAME); in backupOrRestoreAsNeeded()
86 copyTable(BACKUP_TABLE_NAME, Favorites.TABLE_NAME); in backupOrRestoreAsNeeded()
100 Favorites.addTableToDb(mDb, userSerial, false, to); in copyTable()
106 values.put(Favorites._ID, ID_PROPERTY); in encodeDBProperties()
DLoaderTask.java290 LauncherSettings.Favorites.CONTENT_URI, null, null, null, null), mApp); in loadWorkspace()
296 LauncherSettings.Favorites.APPWIDGET_ID); in loadWorkspace()
298 LauncherSettings.Favorites.APPWIDGET_PROVIDER); in loadWorkspace()
300 (LauncherSettings.Favorites.SPANX); in loadWorkspace()
302 LauncherSettings.Favorites.SPANY); in loadWorkspace()
304 LauncherSettings.Favorites.RANK); in loadWorkspace()
306 LauncherSettings.Favorites.OPTIONS); in loadWorkspace()
352 case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT: in loadWorkspace()
353 case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION: in loadWorkspace()
354 case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: in loadWorkspace()
[all …]
DAddWorkspaceItemsTask.java70 if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION || in execute()
71 item.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) { in execute()
78 if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) { in execute()
106 LauncherSettings.Favorites.CONTAINER_DESKTOP, screenId, in execute()
205 if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in findSpaceForItem()
/packages/apps/Launcher3/src/com/android/launcher3/
DAutoInstallsLayout.java42 import com.android.launcher3.LauncherSettings.Favorites;
148 Favorites.containerToString(Favorites.CONTAINER_HOTSEAT);
233 out[0] = Favorites.CONTAINER_HOTSEAT; in parseContainerAndScreen()
237 out[0] = Favorites.CONTAINER_DESKTOP; in parseContainerAndScreen()
264 mValues.put(Favorites.CONTAINER, container); in parseAndAddNode()
265 mValues.put(Favorites.SCREEN, screenId); in parseAndAddNode()
267 mValues.put(Favorites.CELLX, in parseAndAddNode()
269 mValues.put(Favorites.CELLY, in parseAndAddNode()
281 container == Favorites.CONTAINER_DESKTOP) { in parseAndAddNode()
291 mValues.put(Favorites.INTENT, intent.toUri(0)); in addShortcut()
[all …]
DLauncherProvider.java61 import com.android.launcher3.LauncherSettings.Favorites;
193 if (!values.containsKey(LauncherSettings.Favorites._ID)) { in dbInsertAndCheck()
236 values.put(LauncherSettings.Favorites._ID, id); in initializeExternalAdd()
240 Integer itemType = values.getAsInteger(LauncherSettings.Favorites.ITEM_TYPE); in initializeExternalAdd()
242 itemType.intValue() == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET && in initializeExternalAdd()
243 !values.containsKey(LauncherSettings.Favorites.APPWIDGET_ID)) { in initializeExternalAdd()
247 values.getAsString(Favorites.APPWIDGET_PROVIDER)); in initializeExternalAdd()
253 values.put(LauncherSettings.Favorites.APPWIDGET_ID, appWidgetId); in initializeExternalAdd()
328 && Favorites.TABLE_NAME.equalsIgnoreCase(args.table)) { in delete()
408 tableExists(mOpenHelper.getReadableDatabase(), Favorites.BACKUP_TABLE_NAME); in call()
[all …]
DItemInfo.java147 writer.put(LauncherSettings.Favorites.ITEM_TYPE, itemType) in writeToValues()
148 .put(LauncherSettings.Favorites.CONTAINER, container) in writeToValues()
149 .put(LauncherSettings.Favorites.SCREEN, screenId) in writeToValues()
150 .put(LauncherSettings.Favorites.CELLX, cellX) in writeToValues()
151 .put(LauncherSettings.Favorites.CELLY, cellY) in writeToValues()
152 .put(LauncherSettings.Favorites.SPANX, spanX) in writeToValues()
153 .put(LauncherSettings.Favorites.SPANY, spanY) in writeToValues()
154 .put(LauncherSettings.Favorites.RANK, rank); in writeToValues()
158 itemType = values.getAsInteger(LauncherSettings.Favorites.ITEM_TYPE); in readFromValues()
159 container = values.getAsInteger(LauncherSettings.Favorites.CONTAINER); in readFromValues()
[all …]
DWorkspaceItemInfo.java25 import com.android.launcher3.LauncherSettings.Favorites;
91 itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; in WorkspaceItemInfo()
115 itemType = Favorites.ITEM_TYPE_DEEP_SHORTCUT; in WorkspaceItemInfo()
122 writer.put(Favorites.TITLE, title) in onAddToDatabase()
123 .put(Favorites.INTENT, getIntent()) in onAddToDatabase()
124 .put(Favorites.RESTORED, status); in onAddToDatabase()
130 writer.put(Favorites.ICON_PACKAGE, iconResource.packageName) in onAddToDatabase()
131 .put(Favorites.ICON_RESOURCE, iconResource.resourceName); in onAddToDatabase()
182 return itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT ? in getDeepShortcutId()
189 if (cn == null && (itemType == Favorites.ITEM_TYPE_SHORTCUT in getTargetComponent()
DLauncherAppWidgetInfo.java111 itemType = LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET; in LauncherAppWidgetInfo()
113 itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET; in LauncherAppWidgetInfo()
127 itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET; in LauncherAppWidgetInfo()
137 writer.put(LauncherSettings.Favorites.APPWIDGET_ID, appWidgetId) in onAddToDatabase()
138 .put(LauncherSettings.Favorites.APPWIDGET_PROVIDER, providerName.flattenToString()) in onAddToDatabase()
139 .put(LauncherSettings.Favorites.RESTORED, restoreStatus) in onAddToDatabase()
140 .put(LauncherSettings.Favorites.INTENT, bindOptions); in onAddToDatabase()
DAppWidgetsRestoredReceiver.java13 import com.android.launcher3.LauncherSettings.Favorites;
83 .put(LauncherSettings.Favorites.APPWIDGET_ID, newWidgetIds[i]) in restoreAppWidgetIds()
84 .put(LauncherSettings.Favorites.RESTORED, state) in restoreAppWidgetIds()
88 Cursor cursor = cr.query(Favorites.CONTENT_URI, in restoreAppWidgetIds()
89 new String[] {Favorites.APPWIDGET_ID}, in restoreAppWidgetIds()
DDefaultLayoutParser.java17 import com.android.launcher3.LauncherSettings.Favorites;
79 out[0] = LauncherSettings.Favorites.CONTAINER_DESKTOP; in parseContainerAndScreen()
136 Favorites.ITEM_TYPE_APPLICATION); in invalidPackageOrClass()
305 mValues.put(Favorites.APPWIDGET_ID, appWidgetId); in verifyAndInsert()
306 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert()
307 mValues.put(Favorites._ID, mCallback.generateNewItemId()); in verifyAndInsert()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DBaseGridChangesTestCase.java21 public static final int DESKTOP = LauncherSettings.Favorites.CONTAINER_DESKTOP;
22 public static final int HOTSEAT = LauncherSettings.Favorites.CONTAINER_HOTSEAT;
24 public static final int APP_ICON = LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
25 public static final int SHORTCUT = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
55 values.put(LauncherSettings.Favorites._ID, id); in addItem()
56 values.put(LauncherSettings.Favorites.CONTAINER, container); in addItem()
57 values.put(LauncherSettings.Favorites.SCREEN, screen); in addItem()
58 values.put(LauncherSettings.Favorites.CELLX, x); in addItem()
59 values.put(LauncherSettings.Favorites.CELLY, y); in addItem()
60 values.put(LauncherSettings.Favorites.SPANX, 1); in addItem()
[all …]
DDbDowngradeHelperTest.java37 import com.android.launcher3.LauncherSettings.Favorites;
124 try (Cursor c = helper.getWritableDatabase().query(Favorites.TABLE_NAME, in testDowngrade_success_v22()
126 assertEquals(-1, c.getColumnIndex(Favorites.OPTIONS)); in testDowngrade_success_v22()
139 try (Cursor c = helper.getWritableDatabase().query(Favorites.TABLE_NAME, in testDowngrade_success_v22()
142 assertNotSame(-1, c.getColumnIndex(Favorites.OPTIONS)); in testDowngrade_success_v22()
171 values.put(Favorites._ID, i); in setupTestDb()
172 values.put(Favorites.TITLE, "title " + i); in setupTestDb()
173 dbHelper.getWritableDatabase().insert(Favorites.TABLE_NAME, null, values); in setupTestDb()
DGridSizeMigrationTaskTest.java85 Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI, in verifyHotseat()
86 new String[]{LauncherSettings.Favorites._ID}, in verifyHotseat()
103 Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI, in verifyHotseat()
104 new String[]{LauncherSettings.Favorites._ID}, in verifyHotseat()
285 LauncherSettings.Favorites.CONTENT_URI, in verifyWorkspace()
286 new String[]{LauncherSettings.Favorites._ID}, in verifyWorkspace()
304 Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI, in verifyWorkspace()
305 new String[]{LauncherSettings.Favorites._ID}, in verifyWorkspace()
DGridBackupTableTest.java6 import static com.android.launcher3.LauncherSettings.Favorites.BACKUP_TABLE_NAME;
7 import static com.android.launcher3.LauncherSettings.Favorites.TABLE_NAME;
17 import com.android.launcher3.LauncherSettings.Favorites;
95 mContext.getContentResolver().delete(Favorites.CONTENT_URI, null, null); in backupTableRemovedOnDelete()
107 values.put(Favorites.RANK, 4); in backupTableRetainedOnUpdate()
110 .update(Favorites.CONTENT_URI, values, null, null) > 0); in backupTableRetainedOnUpdate()
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
DLoaderCursorTest.java26 import static com.android.launcher3.LauncherSettings.Favorites.INTENT;
27 import static com.android.launcher3.LauncherSettings.Favorites.CELLX;
28 import static com.android.launcher3.LauncherSettings.Favorites.CELLY;
29 import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER;
30 import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP;
31 import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
32 import static com.android.launcher3.LauncherSettings.Favorites.ICON;
33 import static com.android.launcher3.LauncherSettings.Favorites.ICON_PACKAGE;
34 import static com.android.launcher3.LauncherSettings.Favorites.ICON_RESOURCE;
35 import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE;
[all …]
/packages/apps/Launcher3/tests/src/com/android/launcher3/provider/
DRestoreDbTaskTest.java11 import com.android.launcher3.LauncherSettings.Favorites;
37 values.put(Favorites._ID, i); in testMigrateProfileId()
38 values.put(Favorites.TITLE, "item " + i); in testMigrateProfileId()
39 db.insert(Favorites.TABLE_NAME, null, values); in testMigrateProfileId()
57 values.put(Favorites._ID, i); in testChangeDefaultColumn()
58 values.put(Favorites.TITLE, "item " + i); in testChangeDefaultColumn()
59 db.insert(Favorites.TABLE_NAME, null, values); in testChangeDefaultColumn()
68 values.put(Favorites._ID, 100); in testChangeDefaultColumn()
69 values.put(Favorites.TITLE, "item 100"); in testChangeDefaultColumn()
70 db.insert(Favorites.TABLE_NAME, null, values); in testChangeDefaultColumn()
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/widget/
DBindWidgetTest.java131 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testUnboundWidget_removed()
165 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_withConfigScreen()
170 assertEquals(0, mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_withConfigScreen()
174 LauncherSettings.Favorites.APPWIDGET_ID)))); in testPendingWidget_withConfigScreen()
188 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_removed()
206 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_brokenInstall()
213 mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_notRestored_brokenInstall()
234 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_activeInstall()
241 mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_notRestored_activeInstall()
265 writer.put(LauncherSettings.Favorites._ID, item.id); in setupContents()
[all …]

123