/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/celllayout/board/ |
D | TestWorkspaceBuilder.java | 63 FavoriteItemsTransaction transaction, int screenId) { in fillWithWidgets() argument 72 new Rect(x, y, x, y)), screenId)); in fillWithWidgets() 99 FavoriteItemsTransaction transaction, int screenId) { in addCorrespondingWidgetRect() argument 101 fillWithWidgets(widgetRect, transaction, screenId); in addCorrespondingWidgetRect() 103 transaction.addItem(createWidgetInCell(widgetRect, screenId)); in addCorrespondingWidgetRect() 111 FavoriteItemsTransaction transaction, final int screenId) { in buildFromBoard() argument 113 (widgetRect) -> addCorrespondingWidgetRect(widgetRect, transaction, screenId)); in buildFromBoard() 115 transaction.addItem(() -> createIconInCell(iconPoint, screenId)) in buildFromBoard() 118 transaction.addItem(() -> createFolderInCell(folderPoint, screenId)) in buildFromBoard() 134 WidgetRect widgetRect, int screenId) { in createWidgetInCell() argument [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/celllayout/ |
D | CellPosMapper.java | 43 return new CellPos(info.cellX, info.cellY, info.screenId); in mapModelToPresenter() 74 if (info.container != CONTAINER_DESKTOP || (info.screenId % 2) == 0) { in mapModelToPresenter() 77 return new CellPos(info.cellX + mColumnCount, info.cellY, info.screenId - 1); in mapModelToPresenter() 97 public final int screenId; field in CellPosMapper.CellPos 99 public CellPos(int cellX, int cellY, int screenId) { in CellPos() argument 102 this.screenId = screenId; in CellPos() 110 return cellX == cellPos.cellX && cellY == cellPos.cellY && screenId == cellPos.screenId; in equals() 115 return Objects.hash(cellX, cellY, screenId); in hashCode() 123 + ", screenId=" + screenId + '}'; in toString()
|
D | CellInfo.kt | 32 @JvmField val screenId: Int constant 37 screenId = cellPos.screenId 42 return "CellInfo(cell=$cell, screenId=$screenId, container=$container)" in toString()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | WorkspaceItemSpaceFinder.java | 52 ArrayList<ItemInfo> items = screenItems.get(info.screenId); in findSpaceForItem() 55 screenItems.put(info.screenId, items); in findSpaceForItem() 63 int screenId = 0; in findSpaceForItem() local 76 screenId = workspaceScreens.get(screen); in findSpaceForItem() 77 if (!screensToExclude.contains(screenId) && findNextAvailableIconSpaceInScreen( in findSpaceForItem() 78 app, screenItems.get(screenId), coordinates, spanX, spanY)) { in findSpaceForItem() 87 screenId = app.getModel().getModelDbController().getNewScreenId(); in findSpaceForItem() 90 workspaceScreens.add(screenId); in findSpaceForItem() 91 addedWorkspaceScreensFinal.add(screenId); in findSpaceForItem() 95 app, screenItems.get(screenId), coordinates, spanX, spanY)) { in findSpaceForItem() [all …]
|
D | GridSizeMigrationUtil.java | 223 for (int screenId = 0; screenId <= destReader.mLastScreenId; screenId++) { in migrate() 224 screens.add(screenId); in migrate() 228 for (int screenId : screens) { in migrate() 230 Log.d(TAG, "Migrating " + screenId); in migrate() 233 destReader, screenId, trgX, trgY, workspaceToBeAdded); in migrate() 241 int screenId = destReader.mLastScreenId + 1; in migrate() local 243 solveGridPlacement(helper, srcReader, destReader, screenId, trgX, trgY, in migrate() 245 screenId++; in migrate() 345 final int screenId, final int trgX, final int trgY, in solveGridPlacement() argument 349 final Point next = new Point(0, screenId == 0 in solveGridPlacement() [all …]
|
D | ModelWriter.java | 95 ItemInfo item, int container, int screenId, int cellX, int cellY) { in updateItemInfoProps() argument 96 CellPos modelPos = mCellPosMapper.mapPresenterToModel(cellX, cellY, screenId, container); in updateItemInfoProps() 101 item.screenId = modelPos.screenId; in updateItemInfoProps() 110 int container, int screenId, int cellX, int cellY) { in addOrMoveItemInDatabase() argument 113 addItemToDatabase(item, container, screenId, cellX, cellY); in addOrMoveItemInDatabase() 116 moveItemInDatabase(item, container, screenId, cellX, cellY); in addOrMoveItemInDatabase() 132 modelItem.screenId == item.screenId && in checkItemInfoLocked() 161 int container, int screenId, int cellX, int cellY) { in moveItemInDatabase() argument 162 updateItemInfoProps(item, container, screenId, cellX, cellY); in moveItemInDatabase() 171 .put(Favorites.SCREEN, item.screenId))); in moveItemInDatabase() [all …]
|
D | LoaderCursor.java | 475 info.screenId = getInt(mScreenIndex); in applyCommonProperties() 509 int containerIndex = item.screenId; in checkItemPlacement() 514 if (item.screenId >= mIDP.numDatabaseHotseatIcons) { in checkItemPlacement() 516 + " into hotseat position " + item.screenId in checkItemPlacement() 523 if (hotseatOccupancy.cells[(int) item.screenId][0]) { in checkItemPlacement() 525 + " into position (" + item.screenId + ":" + item.cellX + "," in checkItemPlacement() 529 hotseatOccupancy.cells[item.screenId][0] = true; in checkItemPlacement() 534 occupancy.cells[item.screenId][0] = true; in checkItemPlacement() 548 + " into cell (" + containerIndex + "-" + item.screenId + ":" in checkItemPlacement() 554 if (!mOccupied.containsKey(item.screenId)) { in checkItemPlacement() [all …]
|
D | AddWorkspaceItemsTask.java | 135 int screenId = coords[0]; in execute() local 203 LauncherSettings.Favorites.CONTAINER_DESKTOP, screenId, in execute() 222 int lastScreenId = info.screenId; in execute() 224 if (i.screenId == lastScreenId) { in execute()
|
D | ModelUtils.java | 52 if (currentScreenIds.contains(info.screenId)) { in filterCurrentWorkspaceItems() 79 .forEach(i -> seen.add(i.screenId)); in getMissingHotseatRanks()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | WorkspaceLayoutManager.java | 58 int screenId = presenterPos.screenId; in addInScreenFromBind() local 59 x = getHotseat().getCellXFromOrder(screenId); in addInScreenFromBind() 60 y = getHotseat().getCellYFromOrder(screenId); in addInScreenFromBind() 65 addInScreen(child, info.container, presenterPos.screenId, x, y, info.spanX, info.spanY); in addInScreenFromBind() 75 presenterPos.screenId, presenterPos.cellX, presenterPos.cellY, in addInScreen() 90 default void addInScreen(View child, int container, int screenId, int x, int y, in addInScreen() argument 93 if (getScreenWithId(screenId) == null) { in addInScreen() 94 Log.e(TAG, "Skipping child, screenId " + screenId + " not found"); in addInScreen() 100 if (EXTRA_EMPTY_SCREEN_IDS.contains(screenId)) { in addInScreen() 102 throw new RuntimeException("Screen id should not be extra empty screen: " + screenId); in addInScreen() [all …]
|
D | ModelCallbacks.kt | 385 orderedScreenIds.forEach { screenId: Int -> in <lambda>() method 386 screenIds.add(launcher.workspace.getScreenPair(screenId)) in <lambda>() 392 .filterNot { screenId -> in <lambda>() method 395 screenId == WorkspaceLayoutManager.FIRST_SCREEN_ID in <lambda>() 397 .forEach { screenId -> in <lambda>() method 398 launcher.workspace.insertNewWorkspaceScreenBeforeEmptyScreen(screenId) in <lambda>() 409 .filter { screenId -> screenId % 2 == 1 } in <lambda>() method 410 .forEach { screenId -> in <lambda>() method 411 screenIds.remove(screenId) in <lambda>() 413 if (!launcher.workspace.containsScreenId(screenId - 1)) { in <lambda>() [all …]
|
D | Workspace.java | 655 public void insertNewWorkspaceScreenBeforeEmptyScreen(int screenId) { in insertNewWorkspaceScreenBeforeEmptyScreen() argument 662 insertNewWorkspaceScreen(screenId, insertIndex); in insertNewWorkspaceScreenBeforeEmptyScreen() 665 public void insertNewWorkspaceScreen(int screenId) { in insertNewWorkspaceScreen() argument 666 insertNewWorkspaceScreen(screenId, getChildCount()); in insertNewWorkspaceScreen() 669 public CellLayout insertNewWorkspaceScreen(int screenId, int insertIndex) { in insertNewWorkspaceScreen() argument 670 if (mWorkspaceScreens.containsKey(screenId)) { in insertNewWorkspaceScreen() 671 throw new RuntimeException("Screen id " + screenId + " already exists!"); in insertNewWorkspaceScreen() 687 mWorkspaceScreens.put(screenId, newScreen); in insertNewWorkspaceScreen() 688 mScreenOrder.add(insertIndex, screenId); in insertNewWorkspaceScreen() 708 dragObject.dragInfo).screenId); in addExtraEmptyScreenOnDrag() [all …]
|
D | Launcher.java | 837 int screenId = cellPos.screenId; 841 screenId = ensurePendingDropLayoutExists(cellPos.screenId); 846 completeAddShortcut(intent, info.container, screenId, 874 return screenId; 965 int newScreenId = ensurePendingDropLayoutExists(presenterPos.screenId); 966 requestArgs.screenId = getCellPosMapper().mapPresenterToModel( 968 .screenId; 971 mWorkspace.getScreenWithId(presenterPos.screenId); 1026 private int ensurePendingDropLayoutExists(int screenId) { 1027 CellLayout dropLayout = mWorkspace.getScreenWithId(screenId); [all …]
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/ |
D | WorkspaceItemSpaceFinderTest.kt | 58 mScreenOccupancy[newItemSpace.screenId].isRegionVacant( in assertRegionVacant() 80 assertThat(spaceFound.screenId).isEqualTo(1) in justEnoughSpaceOnFirstScreen_whenFindSpaceForItem_thenReturnFirstScreenId() 97 assertThat(spaceFound.screenId).isEqualTo(2) in notEnoughSpaceOnFirstScreen_whenFindSpaceForItem_thenReturnSecondScreenId() 115 assertThat(oldScreens.contains(spaceFound.screenId)).isFalse() in notEnoughSpaceOnExistingScreens_returnNewScreenId() 116 assertThat(mNewScreens.contains(spaceFound.screenId)).isTrue() in notEnoughSpaceOnExistingScreens_returnNewScreenId() 130 assertThat(spaceFound.screenId).isEqualTo(2) in firstScreenIsEmptyButSecondIsNotEmpty_returnSecondScreenId() 145 assertThat(spaceFound.screenId).isEqualTo(3) in twoEmptyMiddleScreens_returnThirdScreen() 160 assertThat(spaceFound.screenId).isEqualTo(3) in allExistingPagesAreFull_returnNewScreenId() 161 assertThat(mNewScreens.contains(spaceFound.screenId)).isTrue() in allExistingPagesAreFull_returnNewScreenId() 176 assertThat(spaceFound.screenId).isEqualTo(3) in firstTwoPagesAreFull_and_ThirdPageIsEmpty_returnThirdPage()
|
D | AddWorkspaceItemsTaskTest.kt | 72 assertThat(addedItems.first().itemInfo.screenId).isEqualTo(1) in givenNewItemAndNonEmptyPages_whenExecuteTask_thenAddNewItem() 86 assertThat(addedItems.first().itemInfo.screenId).isEqualTo(1) in givenNewAndExistingItems_whenExecuteTask_thenOnlyAddNewItem() 113 assertThat(addedItems.first().itemInfo.screenId).isEqualTo(2) in givenNonSequentialScreenIds_whenExecuteTask_thenReturnNewScreenId() 141 val itemsAddedToFirstScreen = addedItems.filter { it.itemInfo.screenId == 1 } in givenMultipleItems_whenExecuteTask_thenAddThem() 146 val itemsAddedToSecondScreen = addedItems.filter { it.itemInfo.screenId == 2 } in givenMultipleItems_whenExecuteTask_thenAddThem()
|
D | FirstScreenBroadcastHelperTest.kt | 127 screenId = 0 in Broadcast Models are created with Installed Items from first screen() 165 screenId = 0 in Broadcast Models are created with Installed Widgets from every screen() 169 screenId = 1 in Broadcast Models are created with Installed Widgets from every screen() 173 screenId = 0 in Broadcast Models are created with Installed Widgets from every screen()
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/model/ |
D | AbstractWorkspaceModelTest.kt | 70 screenIdsWithItems.forEach { screenId -> setupWorkspace(screenId, nonEmptyScreenSpaces) } in <lambda>() method 94 workspaceSpaces.forEachIndexed { screenId, spaces -> in <lambda>() method 96 setupWorkspace(screenId, spaces) in <lambda>() 101 private fun setupWorkspace(screenId: Int, spaces: List<Rect>) { in <lambda>() 105 mExistingScreens.add(screenId) in <lambda>() 106 mScreenOccupancy.append(screenId, occupancy) in <lambda>() 110 mLayoutBuilder.atWorkspace(x, y, screenId).putApp(TEST_PACKAGE, TEST_ACTIVITY) in <lambda>() 129 data class NewItemSpace(val screenId: Int, val cellX: Int, val cellY: Int) { constant in com.android.launcher3.model.NewItemSpace 130 fun toIntArray() = intArrayOf(screenId, cellX, cellY) in toIntArray()
|
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/preview/ui/binder/ |
D | SetWallpaperDialogBinder.kt | 111 PreviewScreenIds.forEach { screenId -> in <lambda>() method 113 previewLayout.requireViewById(screenId.value), in <lambda>() 114 screenId.key, in <lambda>() 134 PreviewScreenIds.forEach { screenId -> in <lambda>() method 137 .requireViewById<FrameLayout>(screenId.value) in <lambda>() 156 screen = screenId.key, in <lambda>() 178 PreviewScreenIds.forEach { screenId -> in <lambda>() method 181 .requireViewById<FrameLayout>(screenId.value) in <lambda>() 187 screen = screenId.key, in <lambda>()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/data/ |
D | ItemInfo.java | 124 public int screenId = -1; field in ItemInfo 208 screenId = info.screenId; in copyFrom() 254 .put(LauncherSettings.Favorites.SCREEN, screenId) in writeToValues() 265 screenId = values.getAsInteger(LauncherSettings.Favorites.SCREEN); in readFromValues() 277 if (Workspace.EXTRA_EMPTY_SCREEN_IDS.contains(screenId)) { in onAddToDatabase() 279 throw new RuntimeException("Screen id should not be extra empty screen: " + screenId); in onAddToDatabase() 298 + " screen=" + screenId in dumpProperties() 395 .setIndex(screenId)) in buildProto() 404 folderBuilder.setGridX(cellX).setGridY(cellY).setPageIndex(screenId); in buildProto() 410 .setIndex(cInfo.screenId)); in buildProto() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/accessibility/ |
D | LauncherAccessibilityDelegate.java | 353 int screenId; in findSpaceOnWorkspace() local 357 screenId = workspaceScreens.get(screenIndex); in findSpaceOnWorkspace() 363 screenId = workspaceScreens.get(screenIndex); in findSpaceOnWorkspace() 370 return screenId; in findSpaceOnWorkspace() 380 screenId = emptyScreenIds.getArray().get(0); in findSpaceOnWorkspace() 381 layout = workspace.getScreenWithId(screenId); in findSpaceOnWorkspace() 387 return screenId; in findSpaceOnWorkspace() 403 final int screenId = findSpaceOnWorkspace(item, coordinates); in addToWorkspace() local 404 if (screenId == -1) { in addToWorkspace() 415 screenId, coordinates[0], coordinates[1]); in addToWorkspace() [all …]
|
D | ShortcutMenuAccessibilityDelegate.java | 60 final int screenId = findSpaceOnWorkspace(item, coordinates); in performAction() local 61 if (screenId == -1) { in performAction() 67 screenId, coordinates[0], coordinates[1]); in performAction()
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/gridmigration/ |
D | GridMigrationUtils.kt | 35 List(items.maxOf { it.screenId + 1 }) { CellLayoutBoard(boardSize.x, boardSize.y) } in contains() 41 boardList[it.screenId].addWidget(it.x, it.y, it.spanX, it.spanY) in contains() 42 Favorites.ITEM_TYPE_APPLICATION -> boardList[it.screenId].addIcon(it.x, it.y) in contains() 50 values.put(Favorites.SCREEN, entry.screenId) in insertIntoDb() 88 screenId = cursor.getInt(indexScreen), in readDb() 107 val screenId: Int, constant in com.android.launcher3.model.gridmigration.WorkspaceItem
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/celllayout/ |
D | CellLayoutTestUtils.java | 45 int screenId = pos.screenId; in workspaceToBoards() local 46 for (int j = boards.size(); j <= screenId; j++) { in workspaceToBoards() 49 CellLayoutBoard board = boards.get(screenId); in workspaceToBoards()
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/celllayout/testgenerator/ |
D | ValidGridMigrationTestCaseGenerator.kt | 53 screenId = it, in <lambda>() 72 screenId = it.first, in <lambda>() 92 screenId = it.first, in <lambda>()
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/ |
D | TaskbarUIController.java | 338 int screenId = info.screenId; in findMatchingView() local 343 && ((ItemInfo) views[i].getTag()).screenId == screenId) { in findMatchingView()
|