/packages/apps/Launcher3/src/com/android/launcher3/provider/ |
D | ImportDataTask.java | 43 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 …]
|
D | RestoreDbTask.java | 36 import com.android.launcher3.LauncherSettings.Favorites; 115 int itemsDeleted = db.delete(Favorites.TABLE_NAME, whereClause.toString(), profileIds); in sanitizeDB() 123 values.put(Favorites.RESTORED, WorkspaceItemInfo.FLAG_RESTORED_ICON in sanitizeDB() 125 db.update(Favorites.TABLE_NAME, values, null, null); in sanitizeDB() 128 values.put(Favorites.RESTORED, LauncherAppWidgetInfo.FLAG_ID_NOT_VALID | in sanitizeDB() 132 db.update(Favorites.TABLE_NAME, values, "itemType = ?", in sanitizeDB() 133 new String[]{Integer.toString(Favorites.ITEM_TYPE_APPWIDGET)}); in sanitizeDB() 172 values.put(Favorites.PROFILE_ID, newProfileId); in migrateProfileId() 173 db.update(Favorites.TABLE_NAME, values, "profileId = ?", in migrateProfileId() 183 Favorites.addTableToDb(db, newProfileId, false); in changeDefaultColumn() [all …]
|
D | LauncherDbUtils.java | 28 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()
|
D | LossyScreenMigrationTask.java | 26 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/ |
D | AutoInstallsLayout.java | 44 import com.android.launcher3.LauncherSettings.Favorites; 153 Favorites.containerToString(Favorites.CONTAINER_HOTSEAT); 241 out[0] = Favorites.CONTAINER_HOTSEAT; in parseContainerAndScreen() 245 out[0] = Favorites.CONTAINER_DESKTOP; in parseContainerAndScreen() 272 mValues.put(Favorites.CONTAINER, container); in parseAndAddNode() 273 mValues.put(Favorites.SCREEN, screenId); in parseAndAddNode() 275 mValues.put(Favorites.CELLX, in parseAndAddNode() 277 mValues.put(Favorites.CELLY, in parseAndAddNode() 289 container == Favorites.CONTAINER_DESKTOP) { in parseAndAddNode() 299 mValues.put(Favorites.INTENT, intent.toUri(0)); in addShortcut() [all …]
|
D | LauncherProvider.java | 59 import com.android.launcher3.LauncherSettings.Favorites; 191 if (!values.containsKey(LauncherSettings.Favorites._ID)) { in dbInsertAndCheck() 234 values.put(LauncherSettings.Favorites._ID, id); in initializeExternalAdd() 238 Integer itemType = values.getAsInteger(LauncherSettings.Favorites.ITEM_TYPE); in initializeExternalAdd() 240 itemType.intValue() == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET && in initializeExternalAdd() 241 !values.containsKey(LauncherSettings.Favorites.APPWIDGET_ID)) { in initializeExternalAdd() 245 values.getAsString(Favorites.APPWIDGET_PROVIDER)); in initializeExternalAdd() 251 values.put(LauncherSettings.Favorites.APPWIDGET_ID, appWidgetId); in initializeExternalAdd() 326 && Favorites.TABLE_NAME.equalsIgnoreCase(args.table)) { in delete() 406 tableExists(mOpenHelper.getReadableDatabase(), Favorites.BACKUP_TABLE_NAME); in call() [all …]
|
D | ItemInfo.java | 150 writer.put(LauncherSettings.Favorites.ITEM_TYPE, itemType) in writeToValues() 151 .put(LauncherSettings.Favorites.CONTAINER, container) in writeToValues() 152 .put(LauncherSettings.Favorites.SCREEN, screenId) in writeToValues() 153 .put(LauncherSettings.Favorites.CELLX, cellX) in writeToValues() 154 .put(LauncherSettings.Favorites.CELLY, cellY) in writeToValues() 155 .put(LauncherSettings.Favorites.SPANX, spanX) in writeToValues() 156 .put(LauncherSettings.Favorites.SPANY, spanY) in writeToValues() 157 .put(LauncherSettings.Favorites.RANK, rank); in writeToValues() 161 itemType = values.getAsInteger(LauncherSettings.Favorites.ITEM_TYPE); in readFromValues() 162 container = values.getAsInteger(LauncherSettings.Favorites.CONTAINER); in readFromValues() [all …]
|
D | WorkspaceItemInfo.java | 28 import com.android.launcher3.LauncherSettings.Favorites; 106 itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; in WorkspaceItemInfo() 131 itemType = Favorites.ITEM_TYPE_DEEP_SHORTCUT; in WorkspaceItemInfo() 138 writer.put(Favorites.TITLE, title) in onAddToDatabase() 139 .put(Favorites.INTENT, getIntent()) in onAddToDatabase() 140 .put(Favorites.RESTORED, status); in onAddToDatabase() 146 writer.put(Favorites.ICON_PACKAGE, iconResource.packageName) in onAddToDatabase() 147 .put(Favorites.ICON_RESOURCE, iconResource.resourceName); in onAddToDatabase() 202 return itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT ? in getDeepShortcutId() 214 if (cn == null && (itemType == Favorites.ITEM_TYPE_SHORTCUT in getTargetComponent()
|
D | LauncherAppWidgetInfo.java | 119 itemType = LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET; in LauncherAppWidgetInfo() 121 itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET; in LauncherAppWidgetInfo() 135 itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET; in LauncherAppWidgetInfo() 145 writer.put(LauncherSettings.Favorites.APPWIDGET_ID, appWidgetId) in onAddToDatabase() 146 .put(LauncherSettings.Favorites.APPWIDGET_PROVIDER, providerName.flattenToString()) in onAddToDatabase() 147 .put(LauncherSettings.Favorites.RESTORED, restoreStatus) in onAddToDatabase() 148 .put(LauncherSettings.Favorites.OPTIONS, options) in onAddToDatabase() 149 .put(LauncherSettings.Favorites.INTENT, bindOptions); in onAddToDatabase()
|
D | AppWidgetsRestoredReceiver.java | 13 import com.android.launcher3.LauncherSettings.Favorites; 91 .put(LauncherSettings.Favorites.APPWIDGET_ID, newWidgetIds[i]) in restoreAppWidgetIds() 92 .put(LauncherSettings.Favorites.RESTORED, state) in restoreAppWidgetIds() 96 Cursor cursor = cr.query(Favorites.CONTENT_URI, in restoreAppWidgetIds() 97 new String[] {Favorites.APPWIDGET_ID}, in restoreAppWidgetIds()
|
D | DefaultLayoutParser.java | 18 import com.android.launcher3.LauncherSettings.Favorites; 84 out[0] = LauncherSettings.Favorites.CONTAINER_DESKTOP; in parseContainerAndScreen() 141 Favorites.ITEM_TYPE_APPLICATION); in invalidPackageOrClass() 312 mValues.put(Favorites.APPWIDGET_ID, appWidgetId); in verifyAndInsert() 313 mValues.put(Favorites.APPWIDGET_PROVIDER, cn.flattenToString()); in verifyAndInsert() 314 mValues.put(Favorites._ID, mCallback.generateNewItemId()); in verifyAndInsert()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | GridSizeMigrationTask.java | 25 import com.android.launcher3.LauncherSettings.Favorites; 125 mDb.update(Favorites.TABLE_NAME, mUpdateOperations.valueAt(i), 133 mDb.delete(Favorites.TABLE_NAME, Utilities.createDbSelectionQuery( 134 Favorites._ID, mEntryToRemove), null); 188 return LauncherDbUtils.queryIntArray(db, Favorites.TABLE_NAME, Favorites.SCREEN, 189 Favorites.CONTAINER + " = " + Favorites.CONTAINER_DESKTOP, 190 Favorites.SCREEN, Favorites.SCREEN); 609 Favorites._ID, // 0 610 Favorites.ITEM_TYPE, // 1 611 Favorites.INTENT, // 2 [all …]
|
D | ModelWriter.java | 38 import com.android.launcher3.LauncherSettings.Favorites; 92 if (container == Favorites.CONTAINER_HOTSEAT) { in updateItemInfoProps() 159 .put(Favorites.CONTAINER, item.container) in moveItemInDatabase() 160 .put(Favorites.CELLX, item.cellX) in moveItemInDatabase() 161 .put(Favorites.CELLY, item.cellY) in moveItemInDatabase() 162 .put(Favorites.RANK, item.rank) in moveItemInDatabase() 163 .put(Favorites.SCREEN, item.screenId))); in moveItemInDatabase() 179 values.put(Favorites.CONTAINER, item.container); in moveItemsInDatabase() 180 values.put(Favorites.CELLX, item.cellX); in moveItemsInDatabase() 181 values.put(Favorites.CELLY, item.cellY); in moveItemsInDatabase() [all …]
|
D | LoaderCursor.java | 106 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 …]
|
D | BgDataModel.java | 135 if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in collectWorkspaceScreens() 200 if (fInfo.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto() 202 } else if (fInfo.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto() 214 if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto() 216 } else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto() 224 if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { in dumpProto() 226 } else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) { in dumpProto() 268 case LauncherSettings.Favorites.ITEM_TYPE_FOLDER: in removeItem() 283 case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: { in removeItem() 294 case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION: in removeItem() [all …]
|
D | GridBackupTable.java | 18 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()
|
D | LoaderTask.java | 295 LauncherSettings.Favorites.CONTENT_URI, null, null, null, null), mApp); in loadWorkspace() 301 LauncherSettings.Favorites.APPWIDGET_ID); in loadWorkspace() 303 LauncherSettings.Favorites.APPWIDGET_PROVIDER); in loadWorkspace() 305 (LauncherSettings.Favorites.SPANX); in loadWorkspace() 307 LauncherSettings.Favorites.SPANY); in loadWorkspace() 309 LauncherSettings.Favorites.RANK); in loadWorkspace() 311 LauncherSettings.Favorites.OPTIONS); in loadWorkspace() 357 case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT: in loadWorkspace() 358 case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION: in loadWorkspace() 359 case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT: in loadWorkspace() [all …]
|
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/ |
D | BaseGridChangesTestCase.java | 21 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 …]
|
D | DbDowngradeHelperTest.java | 37 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()
|
D | GridSizeMigrationTaskTest.java | 85 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()
|
D | GridBackupTableTest.java | 6 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/ |
D | LoaderCursorTest.java | 26 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/ |
D | RestoreDbTaskTest.java | 11 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/ |
D | BindWidgetTest.java | 134 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testUnboundWidget_removed() 168 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_withConfigScreen() 173 assertEquals(0, mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_withConfigScreen() 177 LauncherSettings.Favorites.APPWIDGET_ID)))); in testPendingWidget_withConfigScreen() 191 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_removed() 209 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_brokenInstall() 216 mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_notRestored_brokenInstall() 237 mCursor = mResolver.query(LauncherSettings.Favorites.getContentUri(item.id), in testPendingWidget_notRestored_activeInstall() 244 mCursor.getInt(mCursor.getColumnIndex(LauncherSettings.Favorites.RESTORED)) in testPendingWidget_notRestored_activeInstall() 268 writer.put(LauncherSettings.Favorites._ID, item.id); in setupContents() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/folder/ |
D | FolderNameProvider.java | 21 import com.android.launcher3.LauncherSettings.Favorites; 50 if (workspaceItemInfos.get(0).itemType == Favorites.ITEM_TYPE_APPLICATION) { in getSuggestedFolderName() 52 } else if (wInfo1.itemType == Favorites.ITEM_TYPE_APPLICATION) { in getSuggestedFolderName()
|