Home
last modified time | relevance | path

Searched refs:mModelHelper (Results 1 – 12 of 12) sorted by relevance

/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DModelMultiCallbacksTest.java63 private LauncherModelHelper mModelHelper; field in ModelMultiCallbacksTest
70 mModelHelper = new LauncherModelHelper(); in setUp()
71 mModelHelper.installApp(TEST_PACKAGE); in setUp()
87 mModelHelper.getModel().addCallbacksAndLoad(cb1); in testTwoCallbacks_loadedTogether()
96 mModelHelper.getModel().addCallbacksAndLoad(cb2); in testTwoCallbacks_loadedTogether()
107 mModelHelper.getModel().removeCallbacks(cb2); in testTwoCallbacks_loadedTogether()
113 mModelHelper.getModel().startLoader(); in testTwoCallbacks_loadedTogether()
125 mModelHelper.getModel().addCallbacksAndLoad(cb1); in testTwoCallbacks_receiveUpdates()
126 mModelHelper.getModel().addCallbacksAndLoad(cb2); in testTwoCallbacks_receiveUpdates()
134 mModelHelper.installApp(pkg1); in testTwoCallbacks_receiveUpdates()
[all …]
DGridSizeMigrationTaskV2Test.java55 private LauncherModelHelper mModelHelper; field in GridSizeMigrationTaskV2Test
75 mModelHelper = new LauncherModelHelper(); in setUp()
77 mDb = mModelHelper.provider.getDb(); in setUp()
104 mModelHelper.addItem(APP_ICON, 0, HOTSEAT, 0, 0, testPackage1, 1, TMP_CONTENT_URI), in testMigration()
105 mModelHelper.addItem(SHORTCUT, 1, HOTSEAT, 0, 0, testPackage2, 2, TMP_CONTENT_URI), in testMigration()
107 mModelHelper.addItem(SHORTCUT, 3, HOTSEAT, 0, 0, testPackage3, 3, TMP_CONTENT_URI), in testMigration()
108 mModelHelper.addItem(APP_ICON, 4, HOTSEAT, 0, 0, testPackage4, 4, TMP_CONTENT_URI), in testMigration()
110 mModelHelper.addItem(APP_ICON, 0, DESKTOP, 2, 2, testPackage5, 5, TMP_CONTENT_URI); in testMigration()
111 mModelHelper.addItem(APP_ICON, 0, DESKTOP, 2, 3, testPackage6, 6, TMP_CONTENT_URI); in testMigration()
112 mModelHelper.addItem(APP_ICON, 0, DESKTOP, 4, 1, testPackage8, 8, TMP_CONTENT_URI); in testMigration()
[all …]
DGridSizeMigrationTaskTest.java39 private LauncherModelHelper mModelHelper; field in GridSizeMigrationTaskTest
48 mModelHelper = new LauncherModelHelper(); in setUp()
50 mDb = mModelHelper.provider.getDb(); in setUp()
60 mModelHelper.addItem(APP_ICON, 0, HOTSEAT, 0, 0), in testHotseatMigration_apps_dropped()
61 mModelHelper.addItem(SHORTCUT, 1, HOTSEAT, 0, 0), in testHotseatMigration_apps_dropped()
63 mModelHelper.addItem(SHORTCUT, 3, HOTSEAT, 0, 0), in testHotseatMigration_apps_dropped()
64 mModelHelper.addItem(APP_ICON, 4, HOTSEAT, 0, 0), in testHotseatMigration_apps_dropped()
77 mModelHelper.addItem(APP_ICON, 0, HOTSEAT, 0, 0), in testHotseatMigration_shortcuts_dropped()
78 mModelHelper.addItem(30, 1, HOTSEAT, 0, 0), in testHotseatMigration_shortcuts_dropped()
80 mModelHelper.addItem(SHORTCUT, 3, HOTSEAT, 0, 0), in testHotseatMigration_shortcuts_dropped()
[all …]
DDefaultLayoutProviderTest.java53 private LauncherModelHelper mModelHelper; field in DefaultLayoutProviderTest
58 mModelHelper = new LauncherModelHelper(); in setUp()
71 assertEquals(1, mModelHelper.getBgDataModel().workspaceItems.size()); in testCustomProfileLoaded_with_icon_on_hotseat()
72 ItemInfo info = mModelHelper.getBgDataModel().workspaceItems.get(0); in testCustomProfileLoaded_with_icon_on_hotseat()
86 assertEquals(1, mModelHelper.getBgDataModel().workspaceItems.size()); in testCustomProfileLoaded_with_folder()
87 ItemInfo info = mModelHelper.getBgDataModel().workspaceItems.get(0); in testCustomProfileLoaded_with_folder()
101 assertEquals(1, mModelHelper.getBgDataModel().workspaceItems.size()); in testCustomProfileLoaded_with_folder_custom_title()
102 ItemInfo info = mModelHelper.getBgDataModel().workspaceItems.get(0); in testCustomProfileLoaded_with_folder_custom_title()
126 assertEquals(1, mModelHelper.getBgDataModel().appWidgets.size()); in testCustomProfileLoaded_with_widget()
127 ItemInfo info = mModelHelper.getBgDataModel().appWidgets.get(0); in testCustomProfileLoaded_with_widget()
[all …]
DCacheDataUpdatedTaskTest.java49 private LauncherModelHelper mModelHelper; field in CacheDataUpdatedTaskTest
53 mModelHelper = new LauncherModelHelper(); in setup()
54 mModelHelper.initializeData("/cache_data_updated_task_data.txt"); in setup()
83 for (ItemInfo info : mModelHelper.getBgDataModel().itemsIdMap) { in setup()
97 for (AppInfo info : mModelHelper.getAllAppsList().data) { in testCacheUpdate_update_apps()
101 mModelHelper.executeTaskForTest(newTask(CacheDataUpdatedTask.OP_CACHE_UPDATE, "app1")); in testCacheUpdate_update_apps()
108 assertFalse(mModelHelper.getAllAppsList().data.isEmpty()); in testCacheUpdate_update_apps()
109 for (AppInfo info : mModelHelper.getAllAppsList().data) { in testCacheUpdate_update_apps()
120 mModelHelper.executeTaskForTest(newTask(CacheDataUpdatedTask.OP_SESSION_UPDATE, "app1")); in testSessionUpdate_ignores_normal_apps()
128 mModelHelper.executeTaskForTest(newTask(CacheDataUpdatedTask.OP_SESSION_UPDATE, "app3")); in testSessionUpdate_updates_pending_apps()
[all …]
DPackageInstallStateChangedTaskTest.java28 private LauncherModelHelper mModelHelper; field in PackageInstallStateChangedTaskTest
32 mModelHelper = new LauncherModelHelper(); in setup()
33 mModelHelper.initializeData("/package_install_state_change_task_data.txt"); in setup()
45 mModelHelper.executeTaskForTest(newTask("app1", 30)); in testSessionUpdate_ignore_installed()
53 mModelHelper.executeTaskForTest(newTask("app3", 30)); in testSessionUpdate_shortcuts_updated()
60 mModelHelper.executeTaskForTest(newTask("app4", 30)); in testSessionUpdate_widgets_updated()
67 for (ItemInfo info : mModelHelper.getBgDataModel().itemsIdMap) { in verifyProgressUpdate()
DAddWorkspaceItemsTaskTest.java54 private LauncherModelHelper mModelHelper; field in AddWorkspaceItemsTaskTest
62 mModelHelper = new LauncherModelHelper(); in setup()
90 mAppState, mModelHelper.getBgDataModel(), mExistingScreens, mNewScreens, 1, 1); in testFindSpaceForItem_prefers_second()
97 mAppState, mModelHelper.getBgDataModel(), mExistingScreens, mNewScreens, 2, 3); in testFindSpaceForItem_prefers_second()
110 mAppState, mModelHelper.getBgDataModel(), mExistingScreens, mNewScreens, 3, 3); in testFindSpaceForItem_adds_new_screen()
124 assertTrue(mModelHelper.executeTaskForTest(newTask(info)).isEmpty()); in testAddItem_existing_item_ignored()
130 mModelHelper.getModel().addCallbacks(callbacks); in testAddItem_some_items_added()
141 mModelHelper.executeTaskForTest(newTask(info, info2)).get(0).run(); in testAddItem_some_items_added()
156 return mModelHelper.executeSimpleTask( in setupWorkspaceWithHoles()
DBackupRestoreTest.java70 private LauncherModelHelper mModelHelper; field in BackupRestoreTest
78 mModelHelper = new LauncherModelHelper(); in setUp()
80 mDb = mModelHelper.provider.getDb(); in setUp()
116 mModelHelper.createGrid(new int[][][]{{ in setupBackup()
123 mModelHelper.createGrid(new int[][][]{{ in setupBackup()
166 mModelHelper.provider.getHelper(), mBackupManager); in createRestoreSession()
DGridBackupTableTest.java41 private LauncherModelHelper mModelHelper; field in GridBackupTableTest
47 mModelHelper = new LauncherModelHelper(); in setUp()
49 mDb = mModelHelper.provider.getDb(); in setUp()
55 mModelHelper.createGrid(new int[][][]{{ in setupGridData()
104 mModelHelper.addItem(1, 2, DESKTOP, 1, 1); in backupTableRemovedOnAdd()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/ui/
DLauncherUIScrollTest.java62 private LauncherModelHelper mModelHelper; field in LauncherUIScrollTest
68 mModelHelper = new LauncherModelHelper(); in setup()
75 mModelHelper.installApp(TEST_PACKAGE); in setup()
99 mModelHelper.installApp(TEST_PACKAGE + i); in testAllAppsScroll()
119 mModelHelper.installCustomShortcut(TEST_PACKAGE + i, "shortcutProvider"); in testWidgetsListScroll()
158 mModelHelper.setupDefaultLayoutProvider(mLayoutBuilder).loadModelSync(); in loadLauncher()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/secondarydisplay/
DSDWorkModeTest.java60 private LauncherModelHelper mModelHelper; field in SDWorkModeTest
64 mModelHelper = new LauncherModelHelper(); in setup()
70 mModelHelper.installApp(TEST_PACKAGE); in setup()
111 mModelHelper.installApp(TEST_PACKAGE + i); in loadLauncher()
113 mModelHelper.setupDefaultLayoutProvider(new LauncherLayoutBuilder()).loadModelSync(); in loadLauncher()
/packages/apps/Launcher3/quickstep/robolectric_tests/src/com/android/launcher3/model/
DWidgetsPredicationUpdateTaskTest.java88 private LauncherModelHelper mModelHelper; field in WidgetsPredicationUpdateTaskTest
104 mModelHelper = new LauncherModelHelper(); in setup()
108 mModelHelper.initializeData("/widgets_predication_update_task_data.txt"); in setup()
139 mModelHelper.getModel().addCallbacks(mCallback); in setup()
141 MODEL_EXECUTOR.post(() -> mModelHelper.getBgDataModel().widgetsModel.update( in setup()
161 mModelHelper.executeTaskForTest( in widgetsRecommendationRan_shouldOnlyReturnNotAddedWidgetsInAppPredictionOrder()
200 mModelHelper.executeTaskForTest( in widgetsRecommendationRan_localFilterDisabled_shouldReturnWidgetsInPredicationOrder()