use of com.android.launcher3.util.LauncherModelHelper in project android_packages_apps_Launcher3 by ArrowOS.
the class DefaultLayoutProviderTest method setUp.
@Before
public void setUp() {
mModelHelper = new LauncherModelHelper();
mTargetContext = mModelHelper.sandboxContext;
}
use of com.android.launcher3.util.LauncherModelHelper in project android_packages_apps_Launcher3 by ArrowOS.
the class GridSizeMigrationTaskV2Test method setUp.
@Before
public void setUp() {
mModelHelper = new LauncherModelHelper();
mContext = mModelHelper.sandboxContext;
mDb = mModelHelper.provider.getDb();
mValidPackages = new HashSet<>();
mValidPackages.add(TEST_PACKAGE);
mValidPackages.add(testPackage1);
mValidPackages.add(testPackage2);
mValidPackages.add(testPackage3);
mValidPackages.add(testPackage4);
mValidPackages.add(testPackage5);
mValidPackages.add(testPackage6);
mValidPackages.add(testPackage7);
mValidPackages.add(testPackage8);
mValidPackages.add(testPackage9);
mValidPackages.add(testPackage10);
mIdp = InvariantDeviceProfile.INSTANCE.get(mContext);
long userSerial = UserCache.INSTANCE.get(mContext).getSerialNumberForUser(Process.myUserHandle());
dropTable(mDb, LauncherSettings.Favorites.TMP_TABLE);
LauncherSettings.Favorites.addTableToDb(mDb, userSerial, false, LauncherSettings.Favorites.TMP_TABLE);
}
use of com.android.launcher3.util.LauncherModelHelper in project android_packages_apps_Launcher3 by ArrowOS.
the class AddWorkspaceItemsTaskTest method setup.
@Before
public void setup() {
mModelHelper = new LauncherModelHelper();
mTargetContext = mModelHelper.sandboxContext;
mIdp = InvariantDeviceProfile.INSTANCE.get(mTargetContext);
mIdp.numColumns = mIdp.numRows = 5;
mAppState = LauncherAppState.getInstance(mTargetContext);
mExistingScreens = new IntArray();
mScreenOccupancy = new IntSparseArrayMap<>();
mNewScreens = new IntArray();
}
use of com.android.launcher3.util.LauncherModelHelper in project android_packages_apps_Launcher3 by ArrowOS.
the class LoaderCursorTest method setup.
@Before
public void setup() {
mModelHelper = new LauncherModelHelper();
mContext = mModelHelper.sandboxContext;
mIDP = InvariantDeviceProfile.INSTANCE.get(mContext);
mApp = LauncherAppState.getInstance(mContext);
mCursor = new MatrixCursor(new String[] { ICON, ICON_PACKAGE, ICON_RESOURCE, TITLE, _ID, CONTAINER, ITEM_TYPE, PROFILE_ID, SCREEN, CELLX, CELLY, RESTORED, INTENT });
UserManagerState ums = new UserManagerState();
mLoaderCursor = new LoaderCursor(mCursor, Favorites.CONTENT_URI, mApp, ums);
ums.allUsers.put(0, Process.myUserHandle());
}
use of com.android.launcher3.util.LauncherModelHelper in project android_packages_apps_Launcher3 by ArrowOS.
the class PackageInstallStateChangedTaskTest method setup.
@Before
public void setup() throws Exception {
mModelHelper = new LauncherModelHelper();
mModelHelper.initializeData("package_install_state_change_task_data");
}
Aggregations