Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c97b055 authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Add ApiWrapper Instance to SandboxModelContext.

The SystemShortcutTest is failing after ag/26708194 is submitted.

Bug: 341754469
Bug: 341754775
Test: Manual
Flag: None Bug fix TestFailure
Change-Id: I2e8af1a4913c245a2d5b6164476e240ece79ada8
parent e369bd65
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pm.UserCache;
import com.android.launcher3.util.ApiWrapper;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.LauncherModelHelper.SandboxModelContext;
import com.android.launcher3.util.TestSandboxModelContextWrapper;
@@ -88,6 +89,7 @@ public class SystemShortcutTest {
    private PopupDataProvider mPopupDataProvider;
    private AppInfo mAppInfo;
    @Mock UserCache mUserCache;
    @Mock ApiWrapper mApiWrapper;
    @Mock BaseDragLayer mBaseDragLayer;
    @Mock UserIconInfo mUserIconInfo;
    @Mock LauncherActivityInfo mLauncherActivityInfo;
@@ -98,6 +100,7 @@ public class SystemShortcutTest {
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        mSandboxContext.putObject(UserCache.INSTANCE, mUserCache);
        mSandboxContext.putObject(ApiWrapper.INSTANCE, mApiWrapper);
        mTestContext = new TestSandboxModelContextWrapper(mSandboxContext);
        mView = new View(mSandboxContext);
        spyOn(mTestContext);