mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Refactor all apps to depend on activity context.
The current AllAppsContainerView has been split into a base class and a subclass for activities. The base class allows using all apps with an activity context. A-Z and work profile tabs are supported, but search and the hotseat still require an Activity. Test: Manual. All apps should work the same. Bug: 204696617 Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
This commit is contained in:
@@ -26,7 +26,7 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.AllAppsContainerView;
|
||||
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsPagedView;
|
||||
import com.android.launcher3.allapps.WorkAdapterProvider;
|
||||
import com.android.launcher3.allapps.WorkEduCard;
|
||||
@@ -41,7 +41,7 @@ import java.util.Objects;
|
||||
|
||||
public class WorkProfileTest extends AbstractLauncherUiTest {
|
||||
|
||||
private static final int WORK_PAGE = AllAppsContainerView.AdapterHolder.WORK;
|
||||
private static final int WORK_PAGE = ActivityAllAppsContainerView.AdapterHolder.WORK;
|
||||
|
||||
private int mProfileUserId;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
|
||||
|
||||
// start work profile toggle ON test
|
||||
executeOnLauncher(l -> {
|
||||
AllAppsContainerView allApps = l.getAppsView();
|
||||
ActivityAllAppsContainerView<?> allApps = l.getAppsView();
|
||||
assertEquals("Work tab is not focused", allApps.getCurrentPage(), WORK_PAGE);
|
||||
View workPausedCard = allApps.getActiveRecyclerView().findViewHolderForAdapterPosition(
|
||||
0).itemView;
|
||||
|
||||
Reference in New Issue
Block a user