Moving some tests to robolectric

> Adding support for simulating model load

Bug: 130562632
Change-Id: I1de8c0abe2e74d4e7e47e18914316c339920609a
This commit is contained in:
Sunny Goyal committed 2019-12-09 11:17:12 -08:00
1 parent 0c3fd9823e
commit 4b5b0eb60d
11 files changed
+425 -144

No files matched your search

@@ -42,6 +42,8 @@ import android.util.LongSparseArray;
import android.util.MutableInt;
import android.util.TimingLogger;
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.AppInfo;
import com.android.launcher3.FolderInfo;
import com.android.launcher3.InstallShortcutReceiver;
@@ -271,7 +273,8 @@ public class LoaderTask implements Runnable {
this.notify();
}
private void loadWorkspace(List<ShortcutInfo> allDeepShortcuts) {
@VisibleForTesting
void loadWorkspace(List<ShortcutInfo> allDeepShortcuts) {
final Context context = mApp.getContext();
final ContentResolver contentResolver = context.getContentResolver();
final PackageManagerHelper pmHelper = new PackageManagerHelper(context);